Skip to content

Instantly share code, notes, and snippets.

View jdorfman's full-sized avatar

Justin Dorfman jdorfman

View GitHub Profile

                      |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
@jdorfman
jdorfman / forloop-inet_ntoa
Created February 18, 2012 02:01
just in case you need to convert many IPs from numbers to addresses
for i in `cat ip-addresses`; do echo "SELECT INET_NTOA(${i});" |mysql -uanonymous |awk "NR==2" >> /tmp/ntoa; done
@jdorfman
jdorfman / gist:2474890
Created April 24, 2012 00:26
my new favorite utility
mutt -s "Birthday celebration" -a citymap.jpg all@friends.org \
< invitation.txt
#NetDNA API Sample Code - Python
#Version 1.0a
# Thanks to @sajal from TurboBytes.com for getting this script started
# Contributed: @jdorfman & the @netdna family
import oauth.oauth as oauth
import httplib2, json
import pprint
<?php
/*
* NetDNA API Command Line Utility - PHP
* Version 1.0a
*/
// Get it here: https://raw.github.com/gist/2791330/64b7007ab9d4d4cbb77efd107bb45e16fc6c8cdf/OAuth.php
require_once("OAuth.php");
<?php
// vim: foldmethod=marker
/* Generic exception class
*/
class OAuthException extends Exception {
// pass
}
class OAuthConsumer {
@kylerush
kylerush / s3-maxcdn-deploy.py
Created January 22, 2013 18:09
Git, S3 and MaxCDN Python deploy script. The script gets the changed file between the two latest Git commits, uploads the changed files to S3 and then purges the paths from MaxCDN using the API.
#!/usr/bin/env python
#install the follow first:
#sudo easy_install pip
#sudo pip install -U boto
#sudo pip install configparser
#!/usr/bin/env python
#install the follow first:
#sudo easy_install pip
#sudo pip install -U boto
#sudo pip install configparser
#!/usr/local/bin/bash
#/bin/bash
#Which
Grep="`/usr/bin/which grep`"
Awk="`/usr/bin/which awk`"
Cat="`/usr/bin/which cat`"
Sed="`/usr/bin/which sed`"
Curl="`/usr/bin/which curl`"

An Elasticsearch in Crash Course!

By Andrew Cholakian

All examples use the Stretcher ruby gem

What is Elasticsearch?

  • An Information Retrieval (IR) System
  • A way to search your data in terms of natural language, and so much more