Useful bash commandlines

Gitlab change logos, icons,...

path is: /app/assets/images
after changes do:
sudo gitlab-rake assets:precompile
sudo gitlab-ctl restart unicorn

Import bare repo into gitlab

Just place the bare repo in the gitlab repository folder (repo dir is defined here: /etc/gitlab/gitlab.rb)
gitlab-rake gitlab:import:repos

Git clone via https with self signed certificate

# Initial clone
# set environment variable GIT_SSL_CAINFO pointing to certificate:
export GIT_SSL_CAINFO=/etc/ssl/certs/rorcz_root_cert.pem
git clone

# Ensure all future interactions with origin remote also work
cd org-mode
git config http.sslCAInfo /etc/ssl/certs/rorcz_root_cert.pem

EDUROAM at GSI for raspberry pi linux via (EDIMAX usb stick) wlan

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

wpa_supplicant conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Print from shell via lpr with options

lpr [-P Printer ] [-#n] [-o Options ] file(s)
-#n number of copies
-o page-ranges=2-5
-o sides=two-sided-long-edge
-o landscape
-o saturation=0 (0=black/white, 100=default=original, 200=extreme colors)

What is my ip

curl -s|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Generate SSL certificate for https

Generate server key:
openssl genrsa -out server.key 2048
Generate CSR:
openssl req -new -key server.key -out server.csr
Generate certificate (could be symlinked with server.pem):
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
View cert:
openssl x509 -in certificate.pem -noout -text

Installing drupal 7 with drush

drush dl drupal-7.x
drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://YourSQLUser:RandomPassword@localhost/YourSQLDatabase

Howto detect image size

requirement: imagemagick:

identify -format '%wpt x %hpt' IMAGE.jpg

Subscribe to RSS - Shell