Skip to content

Instantly share code, notes, and snippets.


Ian Winter ianwinter

View GitHub Profile
ianwinter / dynapi_lowercase_googlemx.rb
Last active Aug 29, 2015
Quick script to call Dyn's API to (optionally) remove Postini MX records and add lowercased Google Mail MX records.
View dynapi_lowercase_googlemx.rb
require 'dyn-rb'
# usage: ruby ./lowercase_google_mx.rb
# 1: set up the connection
# 2: set the zone
zone = ARGV[0].to_s = zone

Keybase proof

I hereby claim:

  • I am ianwinter on github.
  • I am ian_winter ( on keybase.
  • I have a public key whose fingerprint is 5314 9836 4AEA 326B 8049 6C8F 4161 671A A1B9 889B

To claim this, I am signing this object:

ianwinter /
Last active Aug 29, 2015
nginx build options
# Author: Ian Winter
# Warranty: None. Here be dragons and krakens.
# Base System: CentOS release 6.5 (Final)
# Notes: This is my own build sciprt, works for me - use at your own risk!
BUILD_DATE=`date +'%Y%m%d_%H%M%S'`
ianwinter / 0_reuse_code.js
Created Oct 22, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View MySQL bulk alter table
mk-find -uroot wld --engine MyISAM --tblregex '^payment' --exec "alter table %D.%N engine=InnoDB" --print
ianwinter / gist:142401
Created Jul 7, 2009
Basic array creation in ColdFusion for use with sphinx
View gist:142401
<cfset variables.sphinx = createobject("java", "org.sphx.api.SphinxClient").init()>
<cfset variables.sphinx.SetLimits(0, 10)>
<cfset variables.arrObj = createobject("java", "java.lang.reflect.Array")>
<cfset variables.jClass = createobject("java", "java.lang.Integer").TYPE>
<cfset variables.jArr = variables.arrObj.newInstance(variables.jClass, 2)>
<cfset variables.arrObj.setInt(variables.jArr, 0, 100)>
<cfset variables.arrObj.setInt(variables.jArr, 1, 200)>
<cfset variables.sphinx.SetFilter("tag", variables.jArr, FALSE)>
ianwinter /
Last active Aug 30, 2015
Replace string using sed
sed -i 's/old/new/g' file.txt
# freebsd
# sed -i '' 's/old/new/g' file.txt
You can’t perform that action at this time.