Skip to content

Instantly share code, notes, and snippets.

Justin Dorfman jdorfman

Block or report user

Report or block jdorfman

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
View gist:2164631
for i in `cat list`; do echo "select * from db.table where value = ${i}" |mysql -umysqluser -ps3cur3p@$$w0rd; done
View gist:2296415
# nginx vhost conf
# redirect images with DMCA complaints
location ~ ^/attach/201204.*\.jpg$ {
alias /usr/local/nginx/html/suspend.html;
}
@jdorfman
jdorfman / es.sh
Created Apr 10, 2012 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 10.10-11.04
View es.sh
cd /tmp/
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@jdorfman
jdorfman / gist:2403041
Created Apr 17, 2012
bash function to run sshuttle asap
View gist:2403041
# get it here: https://github.com/apenwarr/sshuttle
# put this in your .bash_profile and smoke it && source ~/.bash_profile
function p () { /path/to/sshuttle/sshuttle -r you@server 0.0.0.0/0 -vv; }
# p for proxy (change it to whatever you want I guess)
@jdorfman
jdorfman / gist:2474890
Created Apr 24, 2012
my new favorite utility
View gist:2474890
mutt -s "Birthday celebration" -a citymap.jpg all@friends.org \
< invitation.txt
View gist:2484483
$ mkdir -p {1..3}/{1..3}
# Result:
$ tree
.
|-- 1
| |-- 1
| |-- 2
| `-- 3
|-- 2
@jdorfman
jdorfman / gist:2501118
Created Apr 26, 2012 — forked from netdna/gist:2501099
nginx - return a 403 response for certain referers
View gist:2501118
#place this in nginx.conf or a vhosts
if ($http_referer ~* (keyword|domain.com|www.domain.com))
{ return 403; }
@jdorfman
jdorfman / gist:2505372
Created Apr 27, 2012
Nginx vhosts RegEx
View gist:2505372
# place this in a nginx vhosts && service nginx reload
location ~ ^/path/to/files/img.*\.jpg$ {
alias /usr/local/nginx/html/suspend.html;
}
View gist:2514336
# transfer large files in half the time with lftp. SCP and Rsync can't touch this.
lftp -e 'pget -n4 sftp://user:passwd@ftp.server.com/tmp/bigfile.tgz'
View gist:2561443
Microsoft is a failed company? They have had products that failed (so has every other successful company). But with a $269 Billion market cap, I don't think they are failed company as of today... Maybe they are becoming irrelevant, it really depends on your perspective. Like it or not hey still have the seventh most visited site in the world (live.com), the largest browser market share @ 27.95% (as of March 2012), and 85% of the OS market.
Don't get me wrong, the only thing I use from Microsoft is their optical mouses (I think they are the best IMO). But they are far from a failed company. Barnes and Noble on the other hand...
Sources:
https://www.google.com/finance?client=ob&q=NASDAQ:MSFT
http://www.netmarketshare.com/operating-system-market-share.aspx?qprid=10
http://www.alexa.com/topsites
http://en.wikipedia.org/wiki/Usage_share_of_web_browsers
You can’t perform that action at this time.