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| # Parse category migrations by ID from Excel files | |
| # | |
| # Just: | |
| # * paste from the spreadsheet into Sublime | |
| # * paste this line in Shell Turtlestein (plugin) invite | |
| # * replace $4 and $1 by $<category_column_index> and $<id_column_index> (1-based index) | |
| # | |
| # Can be easily adapted for VIM, it's just awk | |
| # Find duplicates in a textual list | |
| # | |
| # Just: | |
| # * paste the list into Sublime | |
| # * paste this line in Shell Turtlestein (plugin) invite | |
| # * replace $1 by $<element_column_index> if there are more than 1 column | |
| # * add flag -F if columns separator is not default (spaces and tabs) | |
| # | |
| # Can be easily adapted for VIM, it's just awk |
| # List cron jobs for all users | |
| for user in $(cut -f1 -d: /etc/passwd); do sudo crontab -u $user -l; done |
| # In New Relic > Monitoring > Database > Show SQL Trace, | |
| # we get a table of slow queries sortable by time spent or by number of occurrences | |
| # This allows us to multiply these 2 values to get an actual amount of pain (qty * unit_cost) | |
| # Copy/Paste this in Sublime's Shell Turtlestein: | |
| | awk -F\t '{ gsub(/[^0-9]/, "", $2); print $2*$3 "\t" $1 }' | sort -nr | |
| # Micro-optimized, with extra-function (so it's not redefined at each call) | |
| delegate = (delegatorConstructor, delegeeProp, method) -> | |
| delegatorConstructor.prototype[ method ] = -> | |
| this[ delegeeProp ][ method ].apply( this[ delegeeProp ], arguments ) | |
| Function.prototype.delegate = ( methodNames..., toProp ) -> | |
| delegeeProp = toProp.to | |
| for method in methodNames | |
| delegate(this, delegeeProp, method) |
| ActiveRecord::Base.logger = Logger.new(STDOUT) |
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/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 |
| 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 |
| 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 |