This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dispatch.json.Js | |
| Js(""" {"foo":{}} """) | |
| Js(""" {"foo":{"bar":{}}} """) | |
| Js(""" {"foo":{"bar":{}, "braz": 0 }} """) | |
| Js(""" {"foo":{"bar":{}, "braz": 0, "moz":1}} """) | |
| // ^^ bombs here | |
| zegoggles.gigjet.tests.FetcherTests: | |
| Error in testJsonParser: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'kml' | |
| require 'shapelib' | |
| include ShapeLib | |
| raise "#{$0} <filename>" if ARGV.empty? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import lxml.etree | |
| import xml.utils.iso8601 | |
| from datetime import datetime, timedelta | |
| from graphication import FileOutput, Series, SeriesSet, Label, SimpleScale, css, default_css as style | |
| from graphication.scales.date import AutoWeekDateScale, AutoDateScale | |
| from graphication.wavegraph import WaveGraph | |
| """ | |
| curl https://user:passwd@api.del.icio.us/v1/posts/all > posts.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #http://hse-at-work.blogspot.com/2006/11/color-scheme-generator-for-charts.html | |
| from random import randint | |
| class Color: | |
| __c = [0, 0, 0] | |
| __cB = None | |
| def __init__(self, r=-1, g=-1, b=-1): | |
| if r == -1: | |
| r = randint(1,255) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require "twitter" | |
| user = ARGV[0] | |
| File.open("data/users/#{user}", "w") do |o| | |
| Twitter.all_tweets(user) do |tweet| | |
| o.puts tweet["text"] | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import csv | |
| from datetime import timedelta, datetime | |
| from graphication import FileOutput, Series, SeriesSet, Label, SimpleScale, css, default_css as style | |
| from graphication.scales.date import AutoWeekDateScale, AutoDateScale | |
| from graphication.wavegraph import WaveGraph | |
| def colorgen(colours): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def submodules | |
| (self.constants.map{|const| const_get(const)}.select{|const| const.is_a? Module}.map{|const| const.submodules} << self).flatten | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set mainfont {Monaco 12} | |
| set textfont {Monaco 12} | |
| set uifont {"Monaco Bold" 12} | |
| set tabstop 8 | |
| set findmergefiles 0 | |
| set maxgraphpct 50 | |
| set maxwidth 16 | |
| set cmitmode patch | |
| set wrapcomment none | |
| set autoselect 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -s http://aserver.com/path/file.csv | ruby -rcsv -e 'puts CSV.parse($stdin.read).map { |a,b| "#{a}\t#{b}" }.join("\n")' | pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'ffi' | |
| module Exec | |
| extend FFI::Library | |
| attach_function :my_exec, :execl, [:string, :string, :varargs], :int | |
| attach_function :fork, [], :int | |
| end | |
| vim1 = '/usr/bin/vim' |