Archive for the 'Uncategorized' Category

 

openssl common commands

Sep 21, 2017 in Uncategorized

. . .

from: https://www.sslshopper.com/article-most-common-openssl-commands.html

>> Check a certificate

# openssl x509 -in certificate.crt -text -noout

>> Check a PKCS#12 file (.pfx or .p12)

# openssl pkcs12 -info -in keyStore.p12

>> Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key


# openssl x509 -noout -modulus -in certificate.crt | openssl md5

# openssl rsa -noout -modulus -in privateKey.key | openssl md5

# openssl req -noout -modulus -in CSR.csr | openssl md5

>> Check an SSL connection. All the certificates (including Intermediates) should be displayed


# openssl s_client -connect www.paypal.com:443

>> Convert a DER file (.crt .cer .der) to PEM


# openssl x509 -inform der -in certificate.cer -out certificate.pem

>> Convert a PEM file to DER


# openssl x509 -outform der -in certificate.pem -out certificate.der

>> Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM


# openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes

  . . .

Oracle connect to schema sqlplus commands

Jan 23, 2014 in Oracle, Uncategorized


$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jan 24 00:05:54 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> grant create session to schema;

Grant succeeded.

SQL> connect schema/password;
Connected.
SQL> ALTER TABLE sometable CONSTRAINT sometable_user_c1;

Table altered.

SQL> ALTER TABLE sometable add CONSTRAINT sometable_user_c1 CHECK (credential_store IN ('east', 'west', 'north', 'south' ));

Table altered.

SQL> commit;

Commit complete.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real ....

$

Quick Eclipse Shortcuts ..

Oct 28, 2009 in Eclipse, Uncategorized

From http://www.ibm.com/developerworks/opensource/library/os-eclipse-master3/index.html

  • — Open Type – Ctrl+Shift+T
  • — Pick part of a string – select section, press Ctrl+1
  • — Quick Outline – Ctrl+O
  • — Enable ‘Breadcrumbs Bar’ – Alt+Shift+B
  • — Code formatting – highlight, Ctrl+Shift+F
  • — Watch the ‘Overview Ruler’ for errors or warnings

From the “Workbench User Guide” ..

History Navigate > Backward (Alt+Left Arrow)

Various Functions > Ctrl+3

Editor List > Ctrl+E

Global Find/Replace > Ctrl+H

Customize, View Keys / Shortcuts > Menu / General / Keys

Find a string incrementally > Edit / Incremental Find Next (Ctlr+J)
> or Find Previous (Ctrl+Shift+J)

Go to last edit location > Navigate / Go to last edit location (Ctrl+Q)

Manipulating lines > Insert new line above (Ctrl+Shift+Enter) or below (Ctrl+Enter)
> Convert to lowercase (Ctrl+Shift+Y) or uppercase (Ctrl+Shift+X)

Quick Diff (what changed while editing) > General / Editors / Text Editors / Quick Diff (Ctrl+Shift+Q)

Next / previous navigation > next = Ctrl+. , previous = Ctrl+, (plus comma)

Word completion > Alt+/. (Ctrl+. on the Mac)

J2EE 1.4 EJBs Notes..

Oct 22, 2009 in Uncategorized

  • — Type of Enterprise Beans Session, Entity and Message (-Driven)
  • — A session bean represents a single client inside the Application Server .
  • –>> 2 types of session beans: stateless and stateful .
  • –>> A stateless session bean (SLSB) does not maintain a conversational state for the client.
  • –>> In a stateful session bean (SFSB), the instance variables represent the state of a unique client-bean session.
  • — An entity bean represents a business object in a persistent storage mechanism.
  • –>> Entity beans are persistent, allow shared access, have primary keys, and can participate in relationships with other entity beans.
  • –>> Two types of persistence for entity beans: bean-managed persistence (BMP) and container-managed persistence (CMP).
  • –>> Part of an entity bean’s deployment descriptor, the abstract schema defines the
    bean’s persistent fields and relationships.
  • –>> Persistence factors:
    –>>– persistent fields
    –>>– Relationship Fields: 1-to-1, many-to-many, etc..), bidirectional or unidirectional
  • — Message-Driven beans – JMS
  • — JCM = J2EE Core Model.
  • — Interfaces: EJBHome, EJBObject, SessionBean,

JBoss 4 EJBs – http://docs.jboss.org/jbossas/guides/j2eeguide/r2/en/html/ch5.chapter.html

Remote:
extends EJBObject
extends EJBHome

Local:
extends EJBLocalObject
extends EJBLocalHome

implements javax.ejb.SessionBean

implements EntityBean

UML2 Diagrams Notes ..

Jul 02, 2009 in Uncategorized

— See http://www.agilemodeling.com/essays/umlDiagrams.htm

  • Activity Diagram
    — typically used for business process modeling, for modeling the logic
    captured by a single use case or usage scenario, or for modeling the
    detailed logic of a business rule.
    — See http://www.agilemodeling.com/artifacts/activityDiagram.htm
  • Class D..
  • Component D..
  • Composite Structures D..
  • Deployment D..
  • Profile Definition D..
  • State Machine D..
  • Use Case D..

Eclipse UML2 Tools notes..

Jul 01, 2009 in UML, Uncategorized

Great introductory article on Eclipse UML Tools

http://www.vogella.de/articles/UML/article.html#uml

Table of Contents

1. UML

    1.1. Overview
    1.2. Definition
    1.3. UML Profiles

2. Installation of Eclipse UML2 Tools
3. Eclipse UML2 Tools

    3.1. Creating UML Diagrams
    3.2. Multiplicity
    3.3. Interfaces
    3.4. Viewing the .uml file

4. Thank you
5. Questions and Discussion
6. Appendix: Class diagrams

    6.1. Overview
    6.2. Classes
    6.3. Attributes
    6.4. Interfaces
    6.5. Relationships

7. Appendix: Model-Driven Architecture (MDA)

    7.1. Overview
    7.2. Platform Independent Model (PIM)
    7.3. Platform Specific Model (PSM)
    7.4. Code Mode

8. Links and Literature

For reverse engineering, see “MoDisco” (Model Discovery)

http://www.eclipse.org/gmt/modisco/

For building UML models from legacy packages, here are some
tips:

http://dev.eclipse.org/newslists/news.eclipse.modeling.gmt.modisco/msg00055.html

...
- the first one builds a Java Abstract Syntax model (based on the JDT Java API) from a Java 
compilation unit, this Java model may be then transformed into a UML2 model using an ATL 
model-to-model transformation (http://www.eclipse.org/m2m/atl/);
- the second one builds a UML2 model from a Jar file.

apache mod_radius compile / build problem..

Jun 12, 2009 in Uncategorized

The mod_radius source code is named

mod_auth_radius-2.0.c

See http://freeradius.org/mod_auth_radius/ (as of today..)

When running this configuration with apache httpd:

./configure \
  --prefix=/usr/local/httpd-2.2.11 \
  --enable-ssl=shared \
  --with-module=aaa:mod_auth_radius-2.0.c

We get an entry in modules.c like this:

extern module auth_radius-2.0_module;

The compiler blows up on this line.

Furthermore..

After renaming the source file to

mod_auth_radius_2_0.c

The linker blows up because the internal name
of the module (inside the mod_auth_radius-2.0.c
file) is this:

module AP_MODULE_DECLARE_DATA radius_auth_module;

which does not match the name of the file.
If we leave the internal name alone, the name
of the file must be:

mod_radius_auth.c

One more thing.. I do not see how this could have built with
apache 2.0 (as opposed to 2.2) since the 2.0.63 does not
contain mod_auth.h which is required by mod_radius..

Funky..

Oracle create table with partitioning ..

Jun 09, 2009 in Database, Oracle, Uncategorized

Example of range partitioning:

CREATE TABLE sales (year NUMBER(4),
                    product VARCHAR2(10),
                    amt NUMBER(10,2))
   PARTITION BY RANGE (year)
   PARTITION p1 VALUES LESS THAN (1992) TABLESPACE u1,
   PARTITION p2 VALUES LESS THAN (1993) TABLESPACE u2,
   PARTITION p3 VALUES LESS THAN (1994) TABLESPACE u3,
   PARTITION p4 VALUES LESS THAN (1995) TABLESPACE u4,
   PARTITION p5 VALUES LESS THAN (MAXVALUE) TABLESPACE u5;

http://www.oracle-dba-online.com/sql/oracle_table_partition.htm

Some useful linux utilities..

Jun 05, 2009 in Uncategorized

List of functions/symbols in a shared object:

$ objdump -T /usr/lib/libXext.so

/usr/lib/libXext.so: file format elf32-i386

DYNAMIC SYMBOL TABLE:
00000000 DF *UND* 000003d6 _XReply
00000000 DF *UND* 00000028 XFree
00000000 DF *UND* 00000057 XESetCreateGC
…………

List of shared object dependencies in an executable:

$ ldd /usr/bin/vi
linux-gate.so.1 => (0xb80e7000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7d1d000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7c91000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7c76000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7c33000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7bf5000)
……………..

Mono debug info ..

Mar 24, 2009 in Uncategorized

http://www.mono-project.com/Debugging