Skip to content

Instantly share code, notes, and snippets.

🇩🇪
Currently hacking from Berlin 🐻

Benedikt Rötsch axe312ger

🇩🇪
Currently hacking from Berlin 🐻
  • Remote / Berlin / Germany
Block or report user

Report or block axe312ger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@axe312ger
axe312ger / gist:6939762
Last active Dec 25, 2015
Clean up drupal standard install profile and install some very useful modules.
View gist:6939762
# 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 Oct 21, 2013
Add iOS/iPhone/iPad Simulator to your OSX applications.
View gist:7084544
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 Oct 28, 2013
Get all sql tables who contain a specific column.
View gist:7200243
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 Dec 26, 2015
Useful regex expressions
View gist:7230485

Useful regex expressions

Find empty lines

^(?:[\t ]*(?:\r?\n|\r))+
@axe312ger
axe312ger / gist:7778065
Created Dec 3, 2013
Sync two directorys recursive in one way. Also display stats and progress.
View gist:7778065
nice -n 5 rsync -ahum --force --delete --stats --progress "/Volumes/Vertex4/" "/Volumes/Backup/Macbook\ Pro\ Early\ 2011/Vertex4/"
@axe312ger
axe312ger / gist:7784737
Created Dec 4, 2013
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…
View gist:7784737
sudo chgrp 0 [shared folder on host]
@axe312ger
axe312ger / gist:7908347
Created Dec 11, 2013
Country term list by continent. Based on http://countrylist.net/ @ 10.12.2013 Rows: Name, Parent, ISO-2 Country Code
View gist:7908347
Asia;;;
Africa;;;
Europe;;;
Australia;;;
South America;;;
North America;;;
Antarctica;;;
Afghanistan;Asia;AF;
Egypt;Africa;EG;
Åland Islands;Europe;AX;
@axe312ger
axe312ger / gist:9369401
Created Mar 5, 2014
Display the time a command needs to be completed. For example to test the dd performance.
View gist:9369401
sudo time dd if=/dev/disk2s1 of=test.deleteme bs=1m
@axe312ger
axe312ger / filebot.md
Last active Nov 3, 2016
mp3tag and filebot renaming
View filebot.md

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(/\./,'')}]
You can’t perform that action at this time.