Skip to content

Instantly share code, notes, and snippets.

View axe312ger's full-sized avatar
🏝️
Enjoying life

Benedikt Rötsch axe312ger

🏝️
Enjoying life
  • Remote / Berlin / Germany
View GitHub Profile
@axe312ger
axe312ger / gist:6939762
Last active December 25, 2015 07:29
Clean up drupal standard install profile and install some very useful modules.
# Create contrib & custom folders
mkdir sites/all/modules/contrib
mkdir sites/all/modules/custom
# Disable useless core modules
drush dis overlay color shortcut toolbar dashboard comment rdf -y
drush pm-uninstall overlay color shortcut toolbar dashboard comment rdf -y
# Install some very useful contrib modules
drush dl ds coffee devel admin_menu search_krumo features views module_filter -y
@axe312ger
axe312ger / gist:7084544
Created October 21, 2013 14:12
Add iOS/iPhone/iPad Simulator to your OSX applications.
cd /Applications
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app iPhone\ Simulator.app
@axe312ger
axe312ger / gist:7200243
Created October 28, 2013 16:39
Get all sql tables who contain a specific column.
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('COLUMN_NAME')
AND TABLE_SCHEMA = 'TABLE_NAME';
@axe312ger
axe312ger / gist:7230485
Last active December 26, 2015 23:29
Useful regex expressions

Useful regex expressions

Find empty lines

^(?:[\t ]*(?:\r?\n|\r))+

@axe312ger
axe312ger / gist:7778065
Created December 3, 2013 21:50
Sync two directorys recursive in one way. Also display stats and progress.
nice -n 5 rsync -ahum --force --delete --stats --progress "/Volumes/Vertex4/" "/Volumes/Backup/Macbook\ Pro\ Early\ 2011/Vertex4/"
@axe312ger
axe312ger / gist:7784737
Created December 4, 2013 09:26
Fix vagrant error: Error: Failed to set group to '0': Operation not permitted - [shared folder] Error: /Stage[main]//Apache::Vhost[ZvdLK5xWSmjX]/File[shared folder]/group: change from dialout to root failed: Failed to set group to '0': Operation not permitted - [shared folder] Warning: /Stage[main]//Apache::Vhost[ZvdLK5xWSmjX]/File[25-ZvdLK5xWSm…
sudo chgrp 0 [shared folder on host]
@axe312ger
axe312ger / gist:7908347
Created December 11, 2013 10:43
Country term list by continent. Based on http://countrylist.net/ @ 10.12.2013 Rows: Name, Parent, ISO-2 Country Code
Asia;;;
Africa;;;
Europe;;;
Australia;;;
South America;;;
North America;;;
Antarctica;;;
Afghanistan;Asia;AF;
Egypt;Africa;EG;
Åland Islands;Europe;AX;
@axe312ger
axe312ger / gist:9369401
Created March 5, 2014 15:25
Display the time a command needs to be completed. For example to test the dd performance.
sudo time dd if=/dev/disk2s1 of=test.deleteme bs=1m
@axe312ger
axe312ger / filebot.md
Last active November 3, 2016 09:28
mp3tag and filebot renaming

filebot

\PATH\TO\YOUR\MOVIE\LIBRARY\{if (ext == 'jpg' || ext == 'jpeg') "_trash-us/$fn/"}{n} ({y}){' - '+source}{if (Integer.parseInt(vf.substring(0, vf.length()-1)) > 720) bene_quali = " - 1080p" else {if(Integer.parseInt(vf.substring(0, vf.length()-1)) > 480) bene_quali = " - 720p" else bene_quali = " - "+sdhd}}/{n} ({y}){' - '+audio.language.replaceAll(/\//, "+")}{' - '+source}{" - CD$pi"} [{"${fn.match(/3D/)}, "}{vc}{', '+vf}{', '+ac}{', '+af}{', '+file.toString().match(/\.ld\.|\.md\.|dubbed/).toUpperCase().replaceAll(/\./,'')}]