This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| k=[];$("*").keydown(function(e){d=k.push(e.keyCode);if(d>11)k.shift();if(k.join()=="38,38,40,40,37,39,37,39,66,65,13")alert("!")}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| setup_brew () { | |
| if ![-f "/usr/local/bin/brew"]; then | |
| /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
| fi | |
| } | |
| setup_ipython () { | |
| brew install readline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export FOO=100 | |
| python - <<END | |
| import os | |
| print "foo:", os.environ['FOO'] | |
| END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import StringIO | |
| from flask import Flask, Response | |
| @app.route('/some_dataframe.csv') | |
| def output_dataframe_csv(): | |
| output = StringIO.StringIO() | |
| some_dataframe.to_csv(output) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run_pg_fouine(): | |
| info = host_info[env.host_string] | |
| db_name = info.tags.get('Name') | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| time.sleep(30) | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
| run('gzip -f /tmp/pgfouine.txt') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # snippet is placed into public domain by | |
| # anatoly techtonik <techtonik@gmail.com> | |
| # http://stackoverflow.com/questions/8151300/ignore-case-in-glob-on-linux | |
| import fnmatch | |
| import os | |
| import re | |
| def findfiles(which, where='.'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a <- data.frame(letter = letters[1:10], num = 1:10) | |
| b <- data.frame(letter = LETTERS[1:5], num2 = c(1:3, 9:10), val = 11:15) | |
| library(dplyr) | |
| insensitive <- function(fun = inner_join) { | |
| new_fun <- fun | |
| body(new_fun) <- substitute({ | |
| by <- dplyr:::common_by(by, x, y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Bitcoin spray: distribute BTC from a coinbase.com account into many addresses | |
| generated by a deterministic wallet (an electrum wallet). | |
| 1.0 BTC -> | |
| 0.01 BTC | |
| 0.01 BTC | |
| 0.01 BTC | |
| etc.. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer