Skip to content

Instantly share code, notes, and snippets.

View adamkittelson's full-sized avatar

Adam Kittelson adamkittelson

  • Adobe
  • Madison, WI
  • 21:42 (UTC -06:00)
View GitHub Profile
// prototype
new Ajax.Request("/your/mom", onSuccess: function(response) { $("lightbox_content").update(response.responseJSON.contents) })
// jquery
$.getJSON("/your/mom", function(json) { $("#lightbox_content").html(json.contents) })
#!/usr/bin/env ruby
`git status --porcelain`.split("\n").each do |path|
`mate #{path[3..-1]}` if path.start_with? '?? '
end
switch((int)op->percent_buffer()) {
case 0..5: mind = "clear"; break;
case 6..25: mind = "almost clear"; break;
case 26..50: mind = "slightly fuzzy"; break;
case 51..75: mind = "clouded"; break;
case 76..89: mind = "very fuzzy"; break;
case 90..110: mind = "full of facts"; break;
default: mind = "clear"; break;
}
# Set the shell format to:
# /path/to/pwd (git branch) $ <input>
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
PURPLE="\[\033[0;34m\]"
YELLOW="\[\033[1;33m\]"
PINK="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"

Keybase proof

I hereby claim:

  • I am adamkittelson on github.
  • I am adamkittelson (https://keybase.io/adamkittelson) on keybase.
  • I have a public key whose fingerprint is 9832 B337 F881 3E65 2B8C 885A 8EC0 ADDB 5673 B4D4

To claim this, I am signing this object:

@adamkittelson
adamkittelson / config.exs
Created August 4, 2015 21:56
Sumologic Logger Backend
use Mix.Config
...
config :logger,
backends: [:console, YourApp.SumoLogger],
level: :info,
utc_log: true
...