Create a free nitrous.io Node.js box then, in the console:
parts install meteor
npm install -g meteorite
cd workspace
git clone https://your_git.url/repo/username
mrt
#!/bin/bash | |
TARGET_DB=wordpress_default | |
# This is meant for a dev env (VVV actually), you may want to use something more secure to store credentials, and possibly a user with target-db-specific privileges. | |
ROOT=root | |
ROOT_PW=root | |
mysql -u${ROOT} -p${ROOT_PW} -e'SHOW DATABASES;' | |
echo "Warning! This will copy the content of ${TARGET_DB}, which may take a lot of disk space (possibly more than you have." | |
read -p "What name for your snapshot? " snapshot |
#!/usr/bin/env ruby | |
# If you're not using rbenv in this script's dir, you may wanna run | |
# these as `sudo gem install ruby-trello`, etc. | |
['ruby-trello', 'dotenv'].each do |gem_name| | |
begin | |
gem gem_name | |
rescue LoadError | |
puts "Running `gem install #{gem_name}`..." | |
puts "If this takes too long, you may want to run it manually, as `sudo` if needed." |
awk 'FNR%10!=0 {printf "%d, ",$1} FNR%10==0 {print $1}' file_with_one_val_per_line.txt |
select case | |
when user_agent like '%iPad%' then '4.iPad' | |
when user_agent like '%iPhone%' then '4.iPhone' | |
when user_agent like '%Android%' then '4.Android' | |
when user_agent like '%Mac OS X%' then '4.OS X' | |
when user_agent like '%X11%' then '4.Linux' | |
when user_agent like '%Windows NT 6.3%' then '3.Windows 8.1' | |
when user_agent like '%Windows NT 6.2%' then '3.Windows 8' | |
when user_agent like '%Windows NT 6.1%' then '3.Windows 7' | |
when user_agent like '%Windows NT 6.0%' then '2.Windows Vista' |
# List all crontabs on a box (from http://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users) | |
for user in $(cut -f1 -d: /etc/passwd); do sudo crontab -u $user -l; done | |
# See what's eating up disk space | |
sudo du -h / | grep '[0-9]G' | |
# Multiple ssh, install i2cssh | |
# cmd+shift+i to broadcast' | |
# Terminal.app alternative is csshx | |
i2cssh -mdj1,dj2,dj3,dj4,dj5 |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \ | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<dict> | |
<key>Label</key> | |
<string>com.ejoubaud.symlinkntfsdisk</string> | |
<key>LowPriorityIO</key> | |
<true/> | |
<key>Program</key> | |
<string>/Users/ejoubaud/Library/Scripts/symlink_ntfs_disk.bash</string> |
mysql -uroot -e 'query;' -BN | |
# -B stands for --bash which usese tab as a separator instead of the annoying tab-like pipes | |
# -N stands for --skip-column-names which removes the column names header | |
# Usage Example: Kills all processes created by the ejoubaud user | |
mysql -uroot -e 'show processlist;' -BN | grep ejoubaud | cut -f1 | xargs -n1 kill |
javascript:(function(){var v="1.10.2";if(window.jQuery===undefined||window.jQuery.fn.jquery<v){var done=false;var script=document.createElement("script");script.src="//ajax.googleapis.com/ajax/libs/jquery/"+v+"/jquery.min.js"; script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;initMyBookmarklet();}};document.getElementsByTagName("head")[0].appendChild(script);}else{initMyBookmarklet();}function initMyBookmarklet(){(window.myBookmarklet=function(){function getSelText(){var s='';if(window.getSelection){s=window.getSelection();}else if(document.getSelection){s=document.getSelection();}else if(document.selection){s=document.selection.createRange().text;}return s;};$.getScript('//tinysort.sjeiti.com/dist/jquery.tinysort.min.js',function(){alert("loaded.\n\n$('.tosort').tsort('.subclass-to-sort-by', {order: 'desc'});\n\n$('#ctl00_ContentMain_CitySearchResult_v2_upResultData>div').tsort('.fontxlargeb.purple', {sortFunctio |
#!/bin/sh | |
DEFAULT_DB=marketplace_development | |
DEFAULT_DUMP=`ls -1t *.sql | head -1` | |
MYSQL_USER=root | |
# Easy overriding | |
export MYSQL_PWD=$MYSQL_PWD | |
export MYSQL_HOST=$MYSQL_HOST |
Create a free nitrous.io Node.js box then, in the console:
parts install meteor
npm install -g meteorite
cd workspace
git clone https://your_git.url/repo/username
mrt