Skip to content

Instantly share code, notes, and snippets.

John Nunemaker jnunemaker

Block or report user

Report or block jnunemaker

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
jnunemaker /
Last active Aug 29, 2015
things that i've read, listened to, or tried in an effort to heal my hands/wrists/arms/shoulders
jnunemaker /
Created Apr 28, 2014 bash automation
catspam() {
curl -vvvv -d "{\"Body\":\"${1}\"}" -H "Content-Type: application/json"
jnunemaker / matrix_maker.rb
Created Oct 21, 2008
quick and dirty way to generate the css needed for an image matrix
View matrix_maker.rb
class Nav
def self.padded_selector(sel, max_len)
attr_accessor :id, :height, :items, :image
def initialize(attrs={})
attrs.each { |k,v| send("#{k}=", v) }
View basic_bot_with_isaac.rb
require 'rubygems'
require 'isaac'
config do |c|
c.nick = "somefanfrickentasticbot"
c.server = ""
c.port = 6667
on :connect do
jnunemaker / jquery_toggle.html
Created Nov 18, 2008
most basic jquery plugin example that makes a link toggle another element
View jquery_toggle.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" charset="utf-8" src=""></script>
<script type="text/javascript" charset="utf-8">
(function($) {
$.fn.toggler = function(options) {
View gist:32043
require 'rubygems'
gem 'httparty', '0.2.0'
require 'httparty'
class JSONPretty
include HTTParty
def self.generate(url)
JSON.pretty_generate(get(url, :format => :json))
View smtp_tls.rb
require "openssl"
require "net/smtp"
Net::SMTP.class_eval do
def do_start(helodomain, user, secret, authtype)
raise IOError, 'SMTP session already started' if @started
check_auth_args user, secret, authtype if user or secret
sock = timeout(@open_timeout) {, @port) }
View github_commits_by_month.rb
require 'rubygems'
require 'httparty'
require 'time'
require 'active_support'"#{ENV['HOME']}/.gitconfig").match(/token = (\w+)/)
TOKEN = $1
class Github
include HTTParty
View gist:78253
# more examples here:
retryable( :tries => 2 ) do
Timeout::timeout(5) do |t|
xml_string = open( my_url, "User-Agent" => "Firefox/2.0" ).read
rescue Timeout::Error
You can’t perform that action at this time.