User Tools

Site Tools


development

This is an old revision of the document!


Development

Git

Documentation online as well as downloadable as HTML, ePub, etc.: Pro Git

Set the default editor:

git config --global core.editor '/usr/bin/sublime -w'

Show the full pretty formatted version log including decoration (branch names and tags):

git log --decorate --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"

Clean log information using git lola alias.

Git global config:

  • Linux: ~/.gitconfig
  • Windows: %HOMEDRIVE%%HOMEPATH%\.gitconfig

Show all diffs which were made between two commits in reverse order (ascending commit time) which is useful for code reviews:

git log commit..commit -p --reverse

Partial staging, select rows to stages:

git add -p test.txt

Useful Git aliases.

LDAP

General information

  • DN: distinguished name
  • CN: common name
  • OU: organizational unit
  • DC: domain component

Searches

  • Search within base DN:
    ldapsearch -h example.com -b ",dc=example,dc=com" "cn=MY_IDENTIFIER"
  • Search the whole database:
    ldapsearch -h example.com "cn=MY_IDENTIFIER"
  • Search a host inside all Oracle TNS strings:
    ldapsearch -h example.com "orclNetDescString=*HOST=database.tld*"

References

Windows

Create .lnk files in batch:

powershell '$s=(New-Object -COM WScript.Shell).CreateShortcut("my_shortcut.lnk");$s.TargetPath="C:\my_path\to\some_file.txt";$s.Save()'

JDBC

Database URL
IBM DB2 jdbc:db2:[HOST]:[PORT]/[DB] | | Microsoft SQL Server | jdbc:microsoft:sqlserver:[HOST]:[PORT](;DatabaseName=[DB])
MySQL jdbc:mysql:[HOST]:[PORT]/[DB] | | Oracle Thin | jdbc:oracle:thin:@[HOST]:[PORT]:[SID]
jdbc:oracle:thin:@[HOST]:[PORT]/[SERVICE_NAME]
jdbc:oracle:thin:@ldap://[LDAP_URL]:[LDAP_PORT]:[SID],[CONTEXT_PATH]
jdbc:oracle:thin:@ldap://[LDAP_URL]:[LDAP_PORT]/[SERVICE_NAME],[CONTEXT_PATH] | | PostgreSQL | jdbc:postgresql:
[HOST]:[PORT]/[DB]
SQLite jdbc:sqlite:sample.db
development.1522323991.txt.gz · Last modified: (external edit)