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
jdorfman / gist:9896843
Created Mar 31, 2014
View gist:9896843
~/github/bootstrap$ cloc bootstrap-cdn/
3369 text files.
2254 unique files.
2476 files ignored. v 1.60 T=24.97 s (66.2 files/s, 19531.6 lines/s)
Language files blank comment code
Javascript 1218 42456 44388 204958
View gist:e593e7a7e5b4979f1fcd
$ curl -I
HTTP/1.1 200 OK
Server: cloudflare-nginx
Date: Mon, 02 Jun 2014 17:48:23 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=d32b93728338081c546f4d5970553c6e11401731283939; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/;; HttpOnly
X-Content-Type-Options: nosniff
Content-Language: en

                      |H|a|p|p|y| |4|t|h| |B|i|r|t|h|d|a|y|
                    |B|o|o|t|s|t|r|a|p|!|  <3   |M|a|x|C|D|N|

Keybase proof

I hereby claim:

  • I am jdorfman on github.
  • I am jdorfman ( on keybase.
  • I have a public key whose fingerprint is B201 D628 F130 2A5E 3815 B7CE BB28 B310 B9F9 0A33

To claim this, I am signing this object:

View .Xdefaults
# transparency - true or false (default)
# tint with any color; i.e., blue, red, tomato4, olivedrab2, etc.
# some nice listings are at:
# shading - 0 to 99 darkens, 101 to 200 lightens.
jdorfman / forloop-inet_ntoa
Created Feb 18, 2012
just in case you need to convert many IPs from numbers to addresses
View forloop-inet_ntoa
for i in `cat ip-addresses`; do echo "SELECT INET_NTOA(${i});" |mysql -uanonymous |awk "NR==2" >> /tmp/ntoa; done
jdorfman / gist:1886408
Created Feb 22, 2012
Convert an IP Address to a Number using a Bash function
View gist:1886408
# insert in .bashrc or .bash_profile & run source ~/.bashrc
function aton {
echo "SELECT INET_ATON('$1');" |mysql -uanonymous > /tmp/aton
awk "NR==2" /tmp/aton
View gist:1946026
# if the request starts with our frontcontroller, pass it on to fastcgi
location ~ ^/index.php
fastcgi_param SCRIPT_FILENAME /var/www/default/pub$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
View gist:2153867
//$domain = $_SERVER['HTTP_HOST'];
$base = "/netdna_api";
//$base_url = "http://$domain$base";
View gist:2159366
# Echo a Range
echo 192.168.0.{2..102} > file.txt
# Replace spaces with newlines
tr ' ' '\n' < file.txt
# Remove a line (386) from a file
You can’t perform that action at this time.