I hereby claim:
- I am netikular on github.
- I am kfpratt (https://keybase.io/kfpratt) on keybase.
- I have a public key whose fingerprint is C296 6328 2D40 E73D 75C2 FBE5 3D5B 3BA1 B83E D232
To claim this, I am signing this object:
from json import load, JSONEncoder | |
from optparse import OptionParser | |
from re import compile | |
float_pat = compile(r'^-?\d+\.\d+(e-?\d+)?$') | |
charfloat_pat = compile(r'^[\[,\,]-?\d+\.\d+(e-?\d+)?$') | |
parser = OptionParser(usage="""%prog [options] | |
Group multiple GeoJSON files into one output file. |
defmodule Tallyj.StringExtensions do | |
@moduledoc """ | |
This module provides a function that will take a uppercase ASCII letter and | |
return the next logical value. Wrapping back to A when Z is provided. | |
Examples: | |
next("A") | |
=> "B" |
#!/bin/sh | |
# I use this to install Elixir on our codeship instances for testing. YMMV. | |
# curl -O https://gist.githubusercontent.com/netikular/335dea6bdbaa369feeff/raw/f891127521858204a67f2b1ea06c1811ad35433d/install_ex.sh | |
# . ~/install_ex.sh | |
# You can override your Elixir and Erlang versions from your shell when you call ./install_ex.sh. | |
ERLANG_VERSION=${ERLANG_VERSION:-18.2.1} | |
ELIXIR_VERSION=${ELIXIR_VERSION:-1.2.0} |
tell application "System Events" to tell UI element "HipChat" of list 1 of process "Dock" | |
perform action "AXShowMenu" | |
delay 0.5 | |
click menu item "Status" of menu 1 | |
click menu item "Available" of menu 1 of menu item "Status" of menu 1 | |
end tell | |
do shell script "<path to hipchat_notification.rb> 'is back from his pomodoro'" |
I hereby claim:
To claim this, I am signing this object:
/* | |
Copied from: http://forums.adobe.com/thread/951628 | |
Below is our communication class. This class is used for all of our RESTful calls. It handles most of the common errors so we don't have to deal with them over and over again in the applications. It always sets itself up as the listener for the RESULT event, does some initial, common processing, then calls the application RESULT function that is set for this particular instance of the communication class. It also has code to inspect the url the SWF was loaded from, and build the REST service url based on that, so we can use one class for multiple sites. | |
Mark | |
Follow up commend from "pradeep" | |
So I have unraveled the Truth. (I think) | |
It's more tortured than one would imagine | |
1/ All HTTP GET requests are stripped of headers. It's not in the Flex stack so it's probably the underlying Flash player runtime |
this.fetch( | |
{ | |
data: { queryString: query }, | |
success: function () { | |
debugger; | |
res = 'success'; | |
console.log('success'); | |
}, | |
error: function () { | |
debugger; |
clearAll: function (e) { | |
e.preventDefault(); | |
var toRemove = this.collection.chain().filter(function(item){ | |
return item.get('IsCompleted'); | |
}).invoke('destroy'); | |
this.collection.remove(toRemove); | |
}, |
syntax on " Enable syntax highlighting | |
filetype on " Enable filetype detection | |
filetype indent on " Enable filetype-specific indenting | |
filetype plugin on " Enable filetype-specific plugins | |
set nocompatible " We're running Vim, not Vi! | |
color slate | |
"some sane indentation | |
set sw=2 | |
set ts=2 |
#From blog post http://ayende.com/blog/108545/the-tax-calculation-challenge | |
require 'test/unit' | |
class Rate | |
def initialize(rate) | |
@percent = rate[:percent] | |
@min = rate[:min].to_f | |
@max = rate[:max].to_f | |
@range = @max - @min |