Skip to content

Instantly share code, notes, and snippets.

View postpostmodern's full-sized avatar

Jason T Johnson postpostmodern

View GitHub Profile
@postpostmodern
postpostmodern / 0_reuse_code.js
Created December 16, 2013 20:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env ruby
require 'fog'
require 'open-uri'
class BrandsmithDNS
def initialize
@dns = Fog::DNS.new(:provider => 'rackspace', :rackspace_api_key => 'xxxxxxxxxxxxxxxxxx', :rackspace_username => 'yyyyyyyyyyyyyyyyyy')
@record = @dns.zones.get('11111111').records.get('A-222222222')
end
@postpostmodern
postpostmodern / plan.js
Created September 21, 2012 14:22 — forked from wyattdanger/plan.js
js demo
var Plan = (function() {
// protected
var records = [];
// the Plan constructor
function Plan(key, id, price) {
this.id = id;
this.price = price;
var more = key.split('||');
@postpostmodern
postpostmodern / rails_bootstrap_delete_confirmation_modal.md
Created February 19, 2012 07:38 — forked from trey/rails_bootstrap_delete_confirmation_modal.md
A nice delete confirmation modal in Rails courtesy of Bootstrap

Here's what you get.

Some CoffeeScript (verbosely commented for clarity)

# Override Rails handling of confirmation

$.rails.allowAction = (element) ->
  # The message is something like "Are you sure?"
  message = element.data('confirm')