Skip to content

Instantly share code, notes, and snippets.

View postpostmodern's full-sized avatar

Jason T Johnson postpostmodern

View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'activeresource'
# Get your API key from your SliceManager here:
# and put it here:
API_PASSWORD = 'your_api_key_goes_here'
unless ARGV.size == 2 && ARGV[1].end_with?('.')
Test Gist
postpostmodern / unform.js
Created December 12, 2008 23:37
unform is a function for replacing form controls with plain text using jQuery
// Replaces form controls with plain text
function unform(form_class)
$('form.'+form_class+' input[type=text]').each(
function() {
$(this).after('<span class="proxy">' + $(this).attr('value') + '</span>');
function() {
postpostmodern / fixns.rb
Created February 5, 2009 17:02
Fixes NS records that incorrectly list instead of as the nameserver
#!/usr/bin/env ruby
# This should fix your NS records if you used the old version of slicedns.rb.
# Check to see if any of your zones list ns1/2/ as a nameserver.
# It will change ALL NS records that have ns* to ns*
require 'rubygems'
require 'activeresource'
API_PASSWORD = 'your_api_key'
require 'fileutils'
unless ARGV.size > 1
puts "Usage: #{__FILE__} email [ email ] ..."
QMAIL_DIR = "/var/qmail/mailnames"
alias_address = ARGV.shift
domain = alias_address.match(/[^@]+$/).to_s
<body class="<%= controller_name -%> <%= action_name -%>">
%body{:class => "#{controller_name} #{action_name}"}
cd "/Users/_YOU_/Library/Application Support/Notational Data/"
# Make sure you've already set up the git repo
git add .
git commit -a -m "Simplenote Sync"
# Get SimplenoteSync here:
// IE doesn't deal well with button elements.
// The following jQuery code fixes the two most common issues:
// 1. All button values being submitted whether they were clicked or not
// 2. Button labels being submitted instead of the value of the value attribute
// Make sure you have loaded jQuery, of course.
if ($.browser.msie) {
jQuery(function() {
$('form button[type=submit]').click(function() {
// Handle on the button clicked
postpostmodern / gist:1343748
Created November 6, 2011 23:03
Pow Aliases
# Pow
alias startpow='curl | sh'
alias stoppow='curl | sh'