This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: http://www.vogella.com/articles/Git/article.html | |
# set proxy for git globally | |
$ git config --global http.proxy http://proxy:8080 | |
# to check the proxy settings | |
$ git config --get http.proxy | |
# just in case you need to you can also revoke the proxy settings | |
$ git config --global --unset http.proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find tutorial; | |
# http://www.grymoire.com/Unix/Find.html | |
# find files modified less than 5 days ago | |
$ find . -type f -mtime -5 -print | xargs ls -l | |
# find files (with spaces in name) modified less than 5 days ago | |
$ find . -type f -mtime -5 -print0 | xargs -0 ls -l | |
# find & remove directories older than 200 days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# plaatsen in profile | |
function trans | |
{ | |
tr '[:upper:]' '[:lower:]' < $1 > $2 | |
} | |
function TRANS | |
{ | |
tr '[:lower:]' '[:upper:]' <$1 > $2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* export database using DbUnit | |
mvn dbunit:export -Pprofile -Ddest=sample-data.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy lines 1-2 /paste after 3 | |
:1,2t3 | |
Move lines 4-5 /paste after 6 | |
:4,5m6 | |
Save lines to new file | |
:10,15w file | |
Delete blanke lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u postgres psql -U postgres < intspecinf_ont_schemas.dmp | |
sudo -u postgres psql -U postgres intspecinf_ont < intspecinf_ont_dataonly.dmp | |
# storybuilder example - dump from localhost & restore to remote server | |
* dump (incl. create tables) | |
/opt/postgresql/91/bin/pg_dump -h localhost -Udba_dubourgm --role=dba -Fp --no-tablespaces --no-owner --no-privileges storybuilder_tst > sb_20121128.dmp | |
* drop & recreate public schema | |
* restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PGBIN_DIR=/usr/bin/ | |
PSQL="${PGBIN_DIR}/psql -w --username=postgres" | |
PG_DUMPALL="${PGBIN_DIR}/pg_dumpall --username=postgres" | |
PG_DUMP="${PGBIN_DIR}/pg_dump --username=postgres" | |
# | |
CRON_DIR=/home/postgres/cron | |
#DUMP_DIR=${HOME}/cron | |
#DUMP_DIR=/data/db/backups | |
DUMP_DIR=/data/postgres/backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SPA_DIR=/data/spa-types/ | |
SPA_FILE=spatypes.txt | |
HEADER="type,profile" | |
SPA_URL=http://spaserver2.ridom.de/dynamic/spatypes.txt | |
SPA_LOG=wget.log | |
DATUM="`date +%y%m%d%H%M`" | |
HTTP_PROXY=http_proxy=http://wwwproxy-dmz.rivm.nl:8080/ | |
export $HTTP_PROXY |
NewerOlder