Skip to content

Instantly share code, notes, and snippets.

🤘
Looking to feature OSS projects on StackShare, let's talk!

Justin Dorfman jdorfman

🤘
Looking to feature OSS projects on StackShare, let's talk!
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
jdorfman / gist:9896843
Created Mar 31, 2014
bootstrapcdn-cloc
View gist:9896843
~/github/bootstrap$ cloc bootstrap-cdn/
3369 text files.
2254 unique files.
2476 files ignored.
http://cloc.sourceforge.net 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 https://localbitcoins.com
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=/; domain=.localbitcoins.com; HttpOnly
X-Content-Type-Options: nosniff
Content-Language: en
View happy-bday-bootstrap.md

                      |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|


    https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.min.css
    https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/js/bootstrap.min.js
View keybase.md

Keybase proof

I hereby claim:

  • I am jdorfman on github.
  • I am jdorfman (https://keybase.io/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)
URxvt*transparent:true
# tint with any color; i.e., blue, red, tomato4, olivedrab2, etc.
# some nice listings are at:
# http://www.nisrv.com/modules.php?name=Hex_Colors
# http://www.htmlgoodies.com/tutorials/colors/article.php/3478921
URxvt*tintColor:blue
# shading - 0 to 99 darkens, 101 to 200 lightens.
@jdorfman
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
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_pass 127.0.0.1:9000;
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
<?php
require_once("OAuth.php");
require_once("OAuthServer.php");
//$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.