├── tmp └── dummy ├── .gitignore ├── test ├── fixtures │ ├── bar.user.js │ ├── foo.user.js │ ├── gists_post │ ├── gists_3 │ ├── gists_2 │ └── gists_1 ├── test_helper.rb └── gisty_test.rb ├── lib ├── commands │ ├── help.rb │ ├── pull_all.rb │ ├── sync.rb │ ├── about.rb │ ├── sync_delete.rb │ ├── list.rb │ ├── private_post.rb │ ├── post.rb │ └── gyast.rb └── gisty.rb ├── .travis.yml ├── Gemfile ├── _gisty ├── bin └── gisty ├── README.rdoc ├── gisty.gemspec └── Rakefile /tmp/dummy: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Gemfile.lock 2 | -------------------------------------------------------------------------------- /test/fixtures/bar.user.js: -------------------------------------------------------------------------------- 1 | // bar.user.js 2 | -------------------------------------------------------------------------------- /test/fixtures/foo.user.js: -------------------------------------------------------------------------------- 1 | // foo.user.js 2 | -------------------------------------------------------------------------------- /lib/commands/help.rb: -------------------------------------------------------------------------------- 1 | cmd :help, '', 'show help' do 2 | puts @help 3 | end 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 2.6.0 4 | - 2.7.0 5 | - ruby-head 6 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | require File.dirname(__FILE__) + '/../lib/gisty' 3 | 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | # Specify your gem's dependencies in gisty.gemspec 3 | gemspec 4 | -------------------------------------------------------------------------------- /lib/commands/pull_all.rb: -------------------------------------------------------------------------------- 1 | cmd :pull_all, '', 'pull all gist' do 2 | @g.pull_all 3 | puts '---' 4 | puts 'pull_all finished.' 5 | end 6 | -------------------------------------------------------------------------------- /lib/commands/sync.rb: -------------------------------------------------------------------------------- 1 | cmd :sync, '', 'sync remote gist (clone all remote gist)' do 2 | @g.sync 3 | puts '---' 4 | puts 'sync finished.' 5 | end 6 | -------------------------------------------------------------------------------- /_gisty: -------------------------------------------------------------------------------- 1 | #compdef gisty 2 | 3 | _arguments '1:first:(list help post sync_delete sync about private_post pull_all)' \ 4 | '*:tail:_files' 5 | 6 | -------------------------------------------------------------------------------- /lib/commands/about.rb: -------------------------------------------------------------------------------- 1 | cmd :about, '', 'show about gisty' do 2 | puts Gisty::AA 3 | puts 4 | puts 'version: ' + Gisty::VERSION 5 | puts 'url: ' + Gisty::GISTY_URL 6 | end 7 | -------------------------------------------------------------------------------- /lib/commands/sync_delete.rb: -------------------------------------------------------------------------------- 1 | cmd :sync_delete, '', 'sync remote gist. delete local gist if remote gist was deleted' do 2 | @g.sync true 3 | puts '---' 4 | puts 'sync finished.' 5 | end 6 | -------------------------------------------------------------------------------- /lib/commands/list.rb: -------------------------------------------------------------------------------- 1 | cmd :list, '', 'show local list' do 2 | list = @g.list 3 | puts '- public gist -' 4 | list[:public].each do |i| 5 | puts "#{i[0]}: #{i[1].join(' ')}" 6 | end 7 | puts '- private gist -' 8 | list[:private].each do |i| 9 | puts "#{i[0]}: #{i[1].join(' ')}" 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/commands/private_post.rb: -------------------------------------------------------------------------------- 1 | cmd :private_post, 'file1 file2 ...', 'post new private gist' do |fs| 2 | if fs.size > 0 3 | begin 4 | url = @g.create fs, :private => true 5 | rescue Exception => e 6 | puts "Error: #{e}" 7 | else 8 | id = url.split('/').last 9 | html_url = "https://gist.github.com/#{id}" 10 | puts html_url 11 | system "open #{html_url}" if /darwin/ === RUBY_PLATFORM 12 | @g.clone id 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/commands/post.rb: -------------------------------------------------------------------------------- 1 | cmd :post, 'file1 file2 ...', 'post new gist' do |fs| 2 | if fs.size > 0 3 | begin 4 | url = @g.create fs 5 | rescue Gisty::InvalidFileException => e 6 | puts "Error: invalid file" 7 | rescue Exception => e 8 | puts "Error: #{e}" 9 | else 10 | id = url.split('/').last 11 | html_url = "https://gist.github.com/#{id}" 12 | puts html_url 13 | system "open #{html_url}" if /darwin/ === RUBY_PLATFORM 14 | @g.clone id 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/commands/gyast.rb: -------------------------------------------------------------------------------- 1 | if /darwin/ === RUBY_PLATFORM 2 | cmd :gyast, '', 'post screencapture' do 3 | now = Time.now.to_i 4 | file_jpg = "/tmp/#{now}.jpg" 5 | system "screencapture -i -t jpg \"#{file_jpg}\"" 6 | sleep 2 7 | unless File.exist? file_jpg 8 | exit 9 | end 10 | 11 | begin 12 | url = @g.create file_jpg 13 | rescue Gisty::InvalidFileException => e 14 | puts "Error: invalid file" 15 | rescue Exception => e 16 | puts "Error: #{e}" 17 | else 18 | id = url.split('/').last 19 | @g.clone id 20 | system "open https://gist.github.com/raw/#{id}/#{now}.jpg" if /darwin/ === RUBY_PLATFORM 21 | end 22 | File.delete file_jpg 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /bin/gisty: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'rubygems' 4 | require 'gisty' 5 | 6 | @cmds = {} 7 | @help = <<-EOS 8 | usage: 9 | gisty commands 10 | commands: 11 | EOS 12 | 13 | def cmd name, args = '', description = '' 14 | @cmds[name.to_s] = Proc.new { |i| yield i } 15 | h = " gisty #{name} #{args}" 16 | @help << h.ljust(40) + description + "\n" 17 | end 18 | 19 | def load_commnads path 20 | Dir.glob(File.join(File.expand_path(path), '*.rb')).each do |i| 21 | begin 22 | load i 23 | rescue Exception => e 24 | p [i, e] 25 | end 26 | end 27 | end 28 | 29 | if ENV['GISTY_DIR'] 30 | begin 31 | @g = Gisty.new ENV['GISTY_DIR'], nil, nil, :ssl_ca => ENV['GISTY_SSL_CA'], 32 | :ssl_verify => ENV['GISTY_SSL_VERIFY'], :access_token => ENV['GISTY_ACCESS_TOKEN'], 33 | :api_url => ENV['GIST_API_URL'], :base_uri => ENV['GISTY_BASE_URI'] 34 | rescue Gisty::UnsetAuthInfoException => e 35 | puts 'Error: OAuth access token is missing.' 36 | puts 'Please get here. https://swdyh-gisty.heroku.com/' 37 | exit 38 | end 39 | else 40 | puts "Error: please set ENV['GISTY_DIR']" 41 | exit 42 | end 43 | 44 | load_commnads Gisty::COMMAND_PATH 45 | load_commnads File.join(ENV['GISTY_DIR'], 'commands') 46 | 47 | if ARGV.size == 0 48 | @cmds['help'].call [] 49 | else 50 | c = @cmds[ARGV.first] 51 | if c 52 | c.call ARGV.last(ARGV.size - 1) 53 | else 54 | puts 'unknown commands.' 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /README.rdoc: -------------------------------------------------------------------------------- 1 | = gisty 2 | 3 | {Build Status}[http://travis-ci.org/swdyh/gisty] 4 | 5 | == Description 6 | 7 | yet another command line client for gist supported API V3. 8 | 9 | == Installation 10 | 11 | === Gem Installation 12 | 13 | gem install gisty 14 | 15 | set environment variable GISTY_DIR. 16 | 17 | export GISTY_DIR="$HOME/dev/gists" 18 | 19 | get OAuth access token here. https://swdyh-gisty.herokuapp.com/ 20 | alternatively: https://github.com/settings/applications -> "Personal access tokens" 21 | set environment variable GISTY_ACCESS_TOKEN 22 | 23 | export GISTY_ACCESS_TOKEN=your_access_key 24 | 25 | if you use zsh command completion, download this file to $fpath directory. 26 | http://github.com/swdyh/gisty/raw/master/_gisty 27 | 28 | 29 | == Features/Problems 30 | 31 | if "certificate verify failed" is occurred, set environment variable GISTY_SSL_CA. 32 | 33 | export GISTY_SSL_CA="/your_ca_file_path/cert.pem" 34 | 35 | if you do not want to verify, set GISTY_SSL_VERIFY. 36 | 37 | export GISTY_SSL_VERIFY="NONE" 38 | 39 | 40 | === GitHub Enterprise 41 | 42 | https://enterprise.github.com/help/articles/using-the-api 43 | 44 | To set the default API access URL: 45 | 46 | export GIST_API_URL=http(s)://github.enterprise.hostname/api/v3/gists 47 | 48 | To specify the base URI reference for the clone path (e.g. git@:id.git) 49 | 50 | export GISTY_BASE_URI=github.enterprise.hostname 51 | 52 | 53 | == Synopsis 54 | 55 | commands 56 | 57 | gisty list show local list. 58 | gisty post file1 file2 ... post new gist. 59 | gisty private_post file1 file2 ... post new private gist. 60 | gisty sync sync remote gist. (clone all remote gist) 61 | gisty sync_delete sync remote gist. delete local gist if remote gist was deleted. 62 | gisty pull_all pull all gist. 63 | gisty about show about gisty 64 | gisty help show help 65 | 66 | == Copyright 67 | 68 | Author:: swdyh 69 | Copyright:: Copyright (c) 2008 swdyh 70 | License:: MIT 71 | -------------------------------------------------------------------------------- /test/fixtures/gists_post: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx/1.0.13 3 | Date: Sat, 24 Mar 2012 10:33:15 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 5000 8 | ETag: "b8da3ff7db37259729d0351331372051" 9 | Location: https://api.github.com/gists/2180935 10 | X-OAuth-Scopes: gist 11 | X-RateLimit-Remaining: 4999 12 | X-Accepted-OAuth-Scopes: gist 13 | Content-Length: 1732 14 | 15 | { 16 | "history": [ 17 | { 18 | "url": "https://api.github.com/gists/2180935/cea881b482d60f5141a4ab088cb0dbdee5567461", 19 | "user": { 20 | "url": "https://api.github.com/users/swdyh", 21 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 22 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 23 | "id": 9168, 24 | "login": "swdyh" 25 | }, 26 | "version": "cea881b482d60f5141a4ab088cb0dbdee5567461", 27 | "change_status": { 28 | "deletions": 0, 29 | "additions": 1, 30 | "total": 1 31 | }, 32 | "committed_at": "2012-03-24T10:33:15Z" 33 | } 34 | ], 35 | "git_push_url": "git@gist.github.com:2180935.git", 36 | "comments": 0, 37 | "updated_at": "2012-03-24T10:33:15Z", 38 | "url": "https://api.github.com/gists/2180935", 39 | "user": { 40 | "url": "https://api.github.com/users/swdyh", 41 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 42 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 43 | "id": 9168, 44 | "login": "swdyh" 45 | }, 46 | "public": true, 47 | "forks": [ 48 | 49 | ], 50 | "created_at": "2012-03-24T10:33:15Z", 51 | "description": "the description for this gist", 52 | "files": { 53 | "file1.txt": { 54 | "type": "text/plain", 55 | "raw_url": "https://gist.github.com/raw/2180935/b087a4c57f47ffad4025004869d7366ddc82d0d1/file1.txt", 56 | "language": "Text", 57 | "size": 20, 58 | "filename": "file1.txt", 59 | "content": "String file contents" 60 | } 61 | }, 62 | "git_pull_url": "git://gist.github.com/2180935.git", 63 | "id": "2180935", 64 | "html_url": "https://gist.github.com/2180935" 65 | } 66 | -------------------------------------------------------------------------------- /gisty.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | # stub: gisty 0.3.0 ruby lib 3 | 4 | Gem::Specification.new do |s| 5 | s.name = "gisty".freeze 6 | s.version = "0.3.0" 7 | 8 | s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= 9 | s.require_paths = ["lib".freeze] 10 | s.authors = ["swdyh".freeze] 11 | s.date = "2020-02-18" 12 | s.description = "yet another command line client for gist. Gisty uses Github API V3 via OAuth2.".freeze 13 | s.email = "http://mailhide.recaptcha.net/d?k=01AhB7crgrlHptVaYRD0oPwA==&c=L_iqOZrGmo6hcGpPTFg1QYnjr-WpAStyQ4Y8ShfgOHs=".freeze 14 | s.executables = ["gisty".freeze] 15 | s.extra_rdoc_files = ["README.rdoc".freeze] 16 | s.files = ["README.rdoc".freeze, "Rakefile".freeze, "bin/gisty".freeze, "lib/commands".freeze, "lib/commands/about.rb".freeze, "lib/commands/gyast.rb".freeze, "lib/commands/help.rb".freeze, "lib/commands/list.rb".freeze, "lib/commands/post.rb".freeze, "lib/commands/private_post.rb".freeze, "lib/commands/pull_all.rb".freeze, "lib/commands/sync.rb".freeze, "lib/commands/sync_delete.rb".freeze, "lib/gisty.rb".freeze, "test/fixtures".freeze, "test/fixtures/bar.user.js".freeze, "test/fixtures/foo.user.js".freeze, "test/fixtures/gists_1".freeze, "test/fixtures/gists_2".freeze, "test/fixtures/gists_3".freeze, "test/fixtures/gists_post".freeze, "test/gisty_test.rb".freeze, "test/test_helper.rb".freeze] 17 | s.homepage = "http://github.com/swdyh/gisty/tree/master".freeze 18 | s.licenses = ["MIT".freeze] 19 | s.rdoc_options = ["--title".freeze, "gisty documentation".freeze, "--charset".freeze, "utf-8".freeze, "--line-numbers".freeze, "--main".freeze, "README.rdoc".freeze, "--inline-source".freeze, "--exclude".freeze, "^(examples|extras)/".freeze] 20 | s.rubygems_version = "2.5.2.3".freeze 21 | s.summary = "yet another command line client for gist.".freeze 22 | s.test_files = ["test/gisty_test.rb".freeze] 23 | 24 | if s.respond_to? :specification_version then 25 | s.specification_version = 4 26 | 27 | if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then 28 | s.add_development_dependency(%q.freeze, [">= 13.0.0", "~> 13.0"]) 29 | s.add_development_dependency(%q.freeze, ["<= 1.1.2"]) 30 | s.add_development_dependency(%q.freeze, [">= 1.3.0", "~> 1.3.0"]) 31 | s.add_development_dependency(%q.freeze, ["~> 4.0"]) 32 | s.add_development_dependency(%q.freeze, ["~> 3.0"]) 33 | else 34 | s.add_dependency(%q.freeze, [">= 13.0.0", "~> 13.0"]) 35 | s.add_dependency(%q.freeze, ["<= 1.1.2"]) 36 | s.add_dependency(%q.freeze, [">= 1.3.0", "~> 1.3.0"]) 37 | s.add_dependency(%q.freeze, ["~> 4.0"]) 38 | s.add_dependency(%q.freeze, ["~> 3.0"]) 39 | end 40 | else 41 | s.add_dependency(%q.freeze, [">= 13.0.0", "~> 13.0"]) 42 | s.add_dependency(%q.freeze, ["<= 1.1.2"]) 43 | s.add_dependency(%q.freeze, [">= 1.3.0", "~> 1.3.0"]) 44 | s.add_dependency(%q.freeze, ["~> 4.0"]) 45 | s.add_dependency(%q.freeze, ["~> 3.0"]) 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rake' 3 | require 'rake/clean' 4 | require 'rake/testtask' 5 | require 'rake/packagetask' 6 | require 'fileutils' 7 | require './lib/gisty' 8 | include FileUtils 9 | 10 | NAME = "gisty" 11 | AUTHOR = "swdyh" 12 | EMAIL = "http://mailhide.recaptcha.net/d?k=01AhB7crgrlHptVaYRD0oPwA==&c=L_iqOZrGmo6hcGpPTFg1QYnjr-WpAStyQ4Y8ShfgOHs=" 13 | SUMMARY = "yet another command line client for gist." 14 | DESCRIPTION = SUMMARY + " Gisty uses Github API V3 via OAuth2." 15 | HOMEPATH = "http://github.com/swdyh/gisty/tree/master" 16 | BIN_FILES = %w( gisty ) 17 | 18 | VERS = Gisty::VERSION 19 | REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil 20 | CLEAN.include ['**/.*.sw?', '*.gem', '.config', '*.gemspec'] 21 | RDOC_OPTS = [ 22 | '--title', "#{NAME} documentation", 23 | "--charset", "utf-8", 24 | "--line-numbers", 25 | "--main", "README.rdoc", 26 | "--inline-source", 27 | ] 28 | 29 | task :default => [:test] 30 | task :package => [:clean] 31 | 32 | Rake::TestTask.new("test") do |t| 33 | t.libs << "test" 34 | t.pattern = "test/**/*_test.rb" 35 | t.verbose = true 36 | end 37 | 38 | spec = Gem::Specification.new do |s| 39 | s.name = NAME 40 | s.version = VERS 41 | s.platform = Gem::Platform::RUBY 42 | s.extra_rdoc_files = ["README.rdoc"] 43 | s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)/'] 44 | s.summary = SUMMARY 45 | s.description = DESCRIPTION 46 | s.author = AUTHOR 47 | s.email = EMAIL 48 | s.homepage = HOMEPATH 49 | s.executables = BIN_FILES 50 | s.bindir = "bin" 51 | s.require_path = "lib" 52 | s.test_files = Dir["test/*_test.rb"] 53 | s.license = 'MIT' 54 | 55 | s.add_development_dependency "rake", '~> 13.0', '>= 13.0.0' 56 | s.add_development_dependency "rr", "<= 1.1.2" 57 | s.add_development_dependency "fakeweb", '~> 1.3.0', '>= 1.3.0' 58 | s.add_development_dependency "minitest", '~> 4.0' 59 | s.add_development_dependency "test-unit", '~> 3.0' 60 | 61 | s.files = %w(README.rdoc Rakefile) + 62 | Dir.glob("{bin,doc,test,lib,templates,generator,extras,website,script}/**/*") + 63 | Dir.glob("ext/**/*.{h,c,rb}") + 64 | Dir.glob("examples/**/*.rb") + 65 | Dir.glob("tools/*.rb") + 66 | Dir.glob("rails/*.rb") 67 | 68 | s.extensions = FileList["ext/**/extconf.rb"].to_a 69 | end 70 | 71 | desc 'Update gem spec' 72 | task :gemspec do 73 | open("#{NAME}.gemspec", 'w') { |f| f.puts spec.to_ruby } 74 | end 75 | 76 | desc 'update gem' 77 | task :update => [:gemspec] do 78 | sh "gem build #{NAME}.gemspec" 79 | end 80 | 81 | desc 'refresh fixtures' 82 | task :reflresh_fixtures do 83 | g = Gisty.new 'tmp' 84 | re = /page=\d+/ 85 | urls = g.map_pages do |url, page| 86 | m = url.match re 87 | if m 88 | fn = 'mine_' + m.to_a.first.sub('=', '_') + '_login_foo_token_bar' 89 | path = File.join 'test', 'fixtures', fn 90 | puts "write #{path}" 91 | open(path, 'w') { |f| f.write page.gsub(/(&)?(login|token)=\w+(&)?/, '') } 92 | end 93 | end 94 | end 95 | -------------------------------------------------------------------------------- /test/gisty_test.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__)) + '/test_helper.rb' 2 | require 'test/unit' 3 | require 'pp' 4 | require 'pathname' 5 | require 'rr' 6 | # require 'fakeweb' 7 | 8 | # FakeWeb.allow_net_connect = false 9 | 10 | def fixtures_path 11 | Pathname.new(File.dirname(__FILE__)).join('fixtures').realpath 12 | end 13 | 14 | def stubs 15 | [ 16 | [ 17 | :get, 18 | 'https://api.github.com/gists', 19 | 'gists_1', 20 | 'https://api.github.com/gists?page=2', 21 | ], 22 | [ 23 | :get, 24 | 'https://api.github.com/gists?page=2', 25 | 'gists_2', 26 | 'https://api.github.com/gists?page=3', 27 | ], 28 | [ 29 | :get, 30 | 'https://api.github.com/gists?page=3', 31 | 'gists_3' 32 | ], 33 | ] 34 | end 35 | 36 | # stubs.each do |stub| 37 | # head, body = IO.read(fixtures_path.join stub[2]).split("\r\n\r\n") 38 | # h = head.split("\r\n").slice(1..-1).inject({}) { |r, i| 39 | # tmp = i.split(':') 40 | # r[tmp[0]] = tmp.slice(1..-1).join(':') 41 | # r 42 | # } 43 | # h[:body] = body 44 | # FakeWeb.register_uri(stub[0], stub[1], h) 45 | # end 46 | 47 | # class FakeWeb::StubSocket 48 | # def close 49 | # end 50 | # end 51 | 52 | class GistyTest < Test::Unit::TestCase 53 | 54 | def setup 55 | @gisty_dir = Pathname.new(File.dirname(__FILE__)).join('tmp') 56 | @gisty = Gisty.new @gisty_dir, :access_token => 'testaccesstoken' 57 | stub_kernel_system! 58 | 59 | stub(OpenURI).open_uri do |cmd| 60 | st = stubs.find { |i| i[1] == cmd} 61 | c = '' 62 | n = st[3] 63 | File.open(fixtures_path.join(st[2])) do |f| 64 | skip = true 65 | f.each do |line| 66 | if line == "\n" 67 | skip = false 68 | next 69 | end 70 | if !skip 71 | c += line 72 | end 73 | end 74 | end 75 | { :content => JSON.parse(c), :link => { :next => st[3], :last => 'last', :prev => 'prev' } } 76 | end 77 | 78 | any_instance_of(Net::HTTP) do |klass| 79 | stub(klass).request do |arg| 80 | r = Net::HTTPSuccess.new(nil, 200, 'OK') 81 | r['Location'] = 'dummy' 82 | r 83 | end 84 | end 85 | end 86 | 87 | def teardown 88 | FileUtils.rm_rf @gisty_dir 89 | end 90 | 91 | def stub_kernel_system! 92 | stub(Kernel).system do |cmd| 93 | # puts "* '#{cmd}' *" 94 | case cmd 95 | when /^git clone/ 96 | id = cmd.split(/[:.]/)[-2] 97 | system "mkdir -p #{id}" 98 | system "touch #{File.join(id, id)}" 99 | else 100 | end 101 | end 102 | end 103 | 104 | def test_unset_access_token 105 | assert_raise(Gisty::UnsetAuthInfoException) { Gisty.new @gisty_dir } 106 | assert_raise(Gisty::UnsetAuthInfoException) { Gisty.new @gisty_dir, :access_token => '' } 107 | end 108 | 109 | def test_mygists 110 | myg = @gisty.mygists 111 | assert_equal 30, myg[:content].size 112 | assert_not_nil myg[:link][:next] 113 | assert_not_nil myg[:link][:last] 114 | 115 | myg2 = @gisty.mygists :url => myg[:link][:next] 116 | assert_equal 30, myg2[:content].size 117 | assert_not_nil myg2[:link][:prev] 118 | assert_not_nil myg2[:link][:next] 119 | assert_not_nil myg2[:link][:last] 120 | end 121 | 122 | 123 | def test_all_mygists 124 | assert_equal 72, @gisty.all_mygists.size 125 | end 126 | 127 | def test_all_mygists_with_block 128 | @gisty.all_mygists { |gist| assert_not_nil gist['id'] } 129 | end 130 | 131 | def test_list 132 | FileUtils.mkdir_p @gisty_dir.join('111') 133 | open(@gisty_dir.join('111').join('test.txt'), 'w') { |f| f.puts 'test' } 134 | FileUtils.mkdir_p @gisty_dir.join('aaa') 135 | open(@gisty_dir.join('aaa').join('test.txt'), 'w') { |f| f.puts 'test' } 136 | FileUtils.mkdir_p @gisty_dir.join('commands') 137 | open(@gisty_dir.join('commands').join('test.rb'), 'w') { |f| f.puts '#test' } 138 | 139 | list = @gisty.list 140 | assert_equal 1, list[:public].size 141 | assert_equal 1, list[:private].size 142 | assert_equal 2, @gisty.local_gist_directories.size 143 | assert_equal 2, @gisty.local_ids.size 144 | end 145 | 146 | # def test_sync 147 | # ids = @gisty.remote_ids 148 | # assert !ids.all? { |i| @gisty_dir.join(i).exist? } 149 | # p [@gisty_dir.exist?] 150 | # p [@gisty_dir, @gisty] 151 | # @gisty.sync 152 | # # p ids.map { |i| [i, @gisty_dir.join(i).exist?] } 153 | # # assert ids.all? { |i| @gisty_dir.join(i).exist? } 154 | # end 155 | 156 | # require stdin input y/n 157 | # def test_sync_delete 158 | # id = '12345' 159 | # assert !@gisty.remote_ids.include?(id) 160 | # @gisty.clone id 161 | # assert @gisty_dir.join(id).exist? 162 | # @gisty.sync true 163 | # assert !@gisty_dir.join(id).exist? 164 | # end 165 | 166 | def test_delete 167 | id = '11111' 168 | pn = @gisty_dir.join id 169 | @gisty.clone id 170 | @gisty.delete id 171 | assert !pn.exist? 172 | end 173 | 174 | def test_build_params 175 | path = File.join('test', 'fixtures', 'foo.user.js') 176 | params = @gisty.build_params path 177 | assert_equal 'foo.user.js', params['files'].keys[0] 178 | assert_equal "// foo.user.js\n", params['files']['foo.user.js']['content'] 179 | end 180 | 181 | def test_build_params_multi 182 | path1 = File.join('test', 'fixtures', 'foo.user.js') 183 | path2 = File.join('test', 'fixtures', 'bar.user.js') 184 | params = @gisty.build_params [path1, path2] 185 | 186 | assert_not_nil params['files']['foo.user.js'] 187 | assert_not_nil params['files']['bar.user.js'] 188 | 189 | assert_equal "// foo.user.js\n", params['files']['foo.user.js']['content'] 190 | assert_equal "// bar.user.js\n", params['files']['bar.user.js']['content'] 191 | end 192 | 193 | def test_ssl_ca_option_default 194 | ca = '/ssl_ca_path/cert.pem' 195 | g = Gisty.new @gisty_dir, :access_token => 'testaccess_token' 196 | assert_nil g.instance_eval { @ssl_ca } 197 | end 198 | 199 | def test_set_ssl_ca_option 200 | ca = '/ssl_ca_path/cert.pem' 201 | g = Gisty.new @gisty_dir, :access_token => 'testaccess_token', :ssl_ca => ca 202 | assert_equal ca, g.instance_eval { @ssl_ca } 203 | end 204 | 205 | def test_ssl_verify_default 206 | g = Gisty.new @gisty_dir, :access_token => 'testaccess_token' 207 | assert_equal OpenSSL::SSL::VERIFY_PEER, g.instance_eval { @ssl_verify } 208 | end 209 | 210 | def test_set_ssl_verify_option 211 | opt = { :access_token => 'testaccess_token' } 212 | 213 | g = Gisty.new @gisty_dir, opt.merge(:ssl_verify => :none) 214 | assert_equal OpenSSL::SSL::VERIFY_NONE, g.instance_eval { @ssl_verify } 215 | 216 | g = Gisty.new @gisty_dir, opt.merge(:ssl_verify => 'NONE') 217 | assert_equal OpenSSL::SSL::VERIFY_NONE, g.instance_eval { @ssl_verify } 218 | 219 | g = Gisty.new @gisty_dir, opt.merge(:ssl_verify => 'None') 220 | assert_equal OpenSSL::SSL::VERIFY_NONE, g.instance_eval { @ssl_verify } 221 | 222 | g = Gisty.new @gisty_dir, opt.merge(:ssl_verify => OpenSSL::SSL::VERIFY_NONE) 223 | assert_equal OpenSSL::SSL::VERIFY_NONE, g.instance_eval { @ssl_verify } 224 | end 225 | 226 | def test_create 227 | # stub 228 | path = File.join('test', 'fixtures', 'foo.user.js') 229 | r = @gisty.create path 230 | assert_not_nil r 231 | end 232 | end 233 | -------------------------------------------------------------------------------- /lib/gisty.rb: -------------------------------------------------------------------------------- 1 | require 'pathname' 2 | require 'net/http' 3 | require 'net/https' 4 | require 'open-uri' 5 | require 'fileutils' 6 | require 'rubygems' 7 | require 'json' 8 | 9 | class Gisty 10 | VERSION = '0.3.0' 11 | GIST_URI = 'gist.github.com' 12 | GIST_API_URL = 'https://api.github.com/gists' 13 | GISTY_URL = 'https://github.com/swdyh/gisty' 14 | USER_AGENT = "gisty/#{VERSION} #{GISTY_URL}" 15 | COMMAND_PATH = Pathname.new(File.join(File.dirname(__FILE__), 'commands')).realpath.to_s 16 | 17 | class UnsetAuthInfoException < Exception 18 | end 19 | 20 | class InvalidFileException < Exception 21 | end 22 | 23 | class PostFailureException < Exception 24 | end 25 | 26 | def initialize path, login = nil, token = nil, opt = {} 27 | if login.class == Hash 28 | opt = login 29 | end 30 | if opt[:access_token] && opt[:access_token].size > 0 31 | @access_token = opt[:access_token].strip 32 | else 33 | raise UnsetAuthInfoException 34 | end 35 | @dir = Pathname.pwd.realpath.join(File.expand_path(path)) 36 | FileUtils.mkdir_p @dir unless @dir.exist? 37 | @ssl_ca = opt[:ssl_ca] 38 | @ssl_verify = case opt[:ssl_verify] 39 | when :none, /none/i, OpenSSL::SSL::VERIFY_NONE 40 | OpenSSL::SSL::VERIFY_NONE 41 | else 42 | OpenSSL::SSL::VERIFY_PEER 43 | end 44 | @api_url = opt[:api_url] || GIST_API_URL 45 | @base_uri = opt[:base_uri] || GIST_URI 46 | end 47 | 48 | def all_mygists &block 49 | r = [] 50 | opt = {} 51 | limit = 30 52 | limit.times do 53 | tmp = mygists opt 54 | r << tmp[:content] 55 | 56 | if block 57 | tmp[:content].each {|i| block.call i } 58 | end 59 | 60 | if tmp[:link][:next] 61 | opt[:url] = tmp[:link][:next] 62 | else 63 | break 64 | end 65 | end 66 | r.flatten 67 | end 68 | 69 | def mygists opt = {} 70 | url = opt[:url] || @api_url 71 | open_uri_opt = { 'User-Agent' => USER_AGENT, 'Authorization' => "token #{@access_token}"} 72 | if @ssl_ca && OpenURI::Options.key?(:ssl_ca_cer) 73 | open_uri_opt[:ssl_ca_cert] = @ssl_ca 74 | end 75 | if @ssl_verify && OpenURI::Options.key?(:ssl_verify_mode) 76 | open_uri_opt[:ssl_verify_mode] = @ssl_verify 77 | end 78 | proxy = URI.parse(url.to_s).find_proxy 79 | 80 | if proxy && proxy.user && OpenURI::Options.key?(:proxy_http_basic_authentication) 81 | open_uri_opt[:proxy_http_basic_authentication] = [proxy, proxy.user, proxy.password] 82 | end 83 | 84 | OpenURI.open_uri(url, open_uri_opt) do |f| 85 | { :content => JSON.parse(f.read), :link => Gisty.parse_link(f.meta['link']) || {} } 86 | end 87 | end 88 | 89 | def self.parse_link link 90 | return nil if link.nil? 91 | link.split(', ').inject({}) do |r, i| 92 | url, rel = i.split '; ' 93 | r[rel.gsub(/^rel=/, '').gsub('"', '').to_sym] = url.gsub(/[<>]/, '').strip 94 | r 95 | end 96 | end 97 | 98 | def remote_ids 99 | all_mygists.map { |i| i['id'] }.sort 100 | end 101 | 102 | def clone id 103 | FileUtils.cd @dir do 104 | c = "git clone git@#{@base_uri}:#{id}.git" 105 | Kernel.system c 106 | end 107 | end 108 | 109 | def list 110 | dirs = local_gist_directories.map do |i| 111 | [i.basename.to_s, Pathname.glob(i.to_s + '/*').map { |i| i.basename.to_s }] 112 | end 113 | re_pub = /^\d+$/ 114 | pub = dirs.select { |i| re_pub.match(i.first) }.sort_by { |i| i.first.to_i }.reverse 115 | pri = dirs.select { |i| !re_pub.match(i.first) }.sort_by { |i| i.first } 116 | { :public => pub, :private => pri } 117 | end 118 | 119 | def local_ids 120 | local_gist_directories.map {|i| i.basename.to_s } 121 | end 122 | 123 | def local_gist_directories 124 | Pathname.glob(@dir.to_s + '/*').select do |i| 125 | i.directory? && !i.to_s.match(/^_/) && i.basename.to_s != 'commands' 126 | end 127 | end 128 | 129 | def delete id 130 | FileUtils.rm_rf @dir.join(id) if @dir.join(id).exist? 131 | end 132 | 133 | def sync delete = false 134 | local = local_ids 135 | FileUtils.cd @dir do 136 | r = all_mygists do |gist| 137 | unless File.exists? gist['id'] 138 | c = "git clone git@#{@base_uri}:#{gist['id']}.git" 139 | Kernel.system c 140 | end 141 | local -= [gist['id']] 142 | end 143 | 144 | if local.size > 0 && delete 145 | local.each do |id| 146 | print "delete #{id}? [y/n]" 147 | confirm = $stdin.gets.strip 148 | if confirm == 'y' || confirm == 'yes' 149 | puts "delete #{id}" 150 | delete id 151 | else 152 | puts "skip #{id}" 153 | end 154 | end 155 | end 156 | open('meta.json', 'w') { |f| f.write JSON.pretty_generate(r) } 157 | end 158 | end 159 | 160 | def pull_all 161 | ids = local_ids 162 | FileUtils.cd @dir do 163 | ids.each do |id| 164 | if File.exist? id 165 | FileUtils.cd id do 166 | c = "git pull" 167 | Kernel.system c 168 | end 169 | end 170 | end 171 | end 172 | end 173 | 174 | def post params 175 | url = URI.parse(@api_url) 176 | req = Net::HTTP::Post.new(url.path) 177 | req.set_content_type('application/json') 178 | req['User-Agent'] = USER_AGENT 179 | req['Authorization'] = "token #{@access_token}" 180 | req.body = params.to_json 181 | if ENV['https_proxy'] 182 | proxy_uri = URI.parse(ENV['https_proxy']) 183 | if proxy_uri.user && proxy_uri.password 184 | https = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password).new(url.host, url.port) 185 | else 186 | https = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port).new(url.host, url.port) 187 | end 188 | else 189 | https = Net::HTTP.new(url.host, url.port) 190 | end 191 | https.use_ssl = true 192 | https.verify_mode = @ssl_verify 193 | https.verify_depth = 5 194 | if @ssl_ca 195 | https.ca_file = @ssl_ca 196 | end 197 | res = https.start {|http| http.request(req) } 198 | case res 199 | when Net::HTTPSuccess, Net::HTTPRedirection 200 | res['Location'] 201 | else 202 | raise PostFailureException, res.inspect 203 | end 204 | end 205 | 206 | def build_params paths 207 | list = (Array === paths ? paths : [paths]).map { |i| Pathname.new i } 208 | raise InvalidFileException if list.any?{ |i| !i.file? } 209 | 210 | params = {} 211 | params['files'] = {} 212 | list.each_with_index do |i, index| 213 | params['files'][i.basename.to_s] = { 'content' => IO.read(i) } 214 | end 215 | params 216 | end 217 | 218 | def create paths, opt = { :private => false } 219 | params = build_params paths 220 | if opt[:private] 221 | params['public'] = false 222 | else 223 | params['public'] = true 224 | end 225 | post params 226 | end 227 | 228 | # `figlet -f contributed/bdffonts/clb8x8.flf gisty`.gsub('#', 'm') 229 | AA = <<-EOS 230 | mm mm 231 | mm 232 | mmmmmm mmmm mmmmm mmmmmm mm mm 233 | mm mm mm mm mm mm mm 234 | mm mm mm mmmm mm mm mm 235 | mmmmmm mm mm mm mmmmm 236 | mm mmmmmm mmmmm mmm mm 237 | mmmmm mmmm 238 | EOS 239 | end 240 | -------------------------------------------------------------------------------- /test/fixtures/gists_3: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx/1.0.13 3 | Date: Wed, 21 Mar 2012 12:26:39 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | Content-Length: 12018 8 | X-RateLimit-Limit: 5000 9 | X-RateLimit-Remaining: 4990 10 | ETag: "c63e34280b5765df053e029d4ad6865a" 11 | Link: ; rel="first", ; rel="prev" 12 | X-OAuth-Scopes: gist 13 | X-Accepted-OAuth-Scopes: gist 14 | 15 | [ 16 | { 17 | "description": null, 18 | "updated_at": "2009-10-14T15:33:24Z", 19 | "git_pull_url": "git://gist.github.com/20059.git", 20 | "comments": 0, 21 | "files": { 22 | "gistfile1.txt": { 23 | "type": "text/plain", 24 | "filename": "gistfile1.txt", 25 | "raw_url": "https://gist.github.com/raw/20059/eab290cab6038dc3b1e6cbbc240dd657b3aad71f/gistfile1.txt", 26 | "size": 1512, 27 | "language": "Text" 28 | } 29 | }, 30 | "public": true, 31 | "git_push_url": "git@gist.github.com:20059.git", 32 | "created_at": "2008-10-27T09:05:04Z", 33 | "id": "20059", 34 | "url": "https://api.github.com/gists/20059", 35 | "user": { 36 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 37 | "login": "swdyh", 38 | "url": "https://api.github.com/users/swdyh", 39 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 40 | "id": 9168 41 | }, 42 | "html_url": "https://gist.github.com/20059" 43 | }, 44 | { 45 | "description": null, 46 | "updated_at": "2009-10-14T15:33:24Z", 47 | "git_pull_url": "git://gist.github.com/19595.git", 48 | "comments": 0, 49 | "files": { 50 | "gistfile1": { 51 | "type": "text/plain", 52 | "filename": "gistfile1", 53 | "raw_url": "https://gist.github.com/raw/19595/7ad6c99c58f315de4007fb11d778d69116cb5ef9/gistfile1", 54 | "size": 13, 55 | "language": null 56 | } 57 | }, 58 | "public": true, 59 | "git_push_url": "git@gist.github.com:19595.git", 60 | "created_at": "2008-10-24T21:25:30Z", 61 | "id": "19595", 62 | "url": "https://api.github.com/gists/19595", 63 | "user": { 64 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 65 | "login": "swdyh", 66 | "url": "https://api.github.com/users/swdyh", 67 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 68 | "id": 9168 69 | }, 70 | "html_url": "https://gist.github.com/19595" 71 | }, 72 | { 73 | "description": null, 74 | "updated_at": "2009-10-14T15:33:24Z", 75 | "git_pull_url": "git://gist.github.com/19584.git", 76 | "comments": 0, 77 | "files": { 78 | "gistfile1": { 79 | "type": "text/plain", 80 | "filename": "gistfile1", 81 | "raw_url": "https://gist.github.com/raw/19584/9daeafb9864cf43055ae93beb0afd6c7d144bfa4/gistfile1", 82 | "size": 5, 83 | "language": null 84 | } 85 | }, 86 | "public": true, 87 | "git_push_url": "git@gist.github.com:19584.git", 88 | "created_at": "2008-10-24T21:14:40Z", 89 | "id": "19584", 90 | "url": "https://api.github.com/gists/19584", 91 | "user": { 92 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 93 | "login": "swdyh", 94 | "url": "https://api.github.com/users/swdyh", 95 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 96 | "id": 9168 97 | }, 98 | "html_url": "https://gist.github.com/19584" 99 | }, 100 | { 101 | "description": null, 102 | "updated_at": "2009-10-14T15:33:24Z", 103 | "git_pull_url": "git://gist.github.com/17797.git", 104 | "comments": 0, 105 | "files": { 106 | "bccks nodokeshi": { 107 | "type": "text/plain", 108 | "filename": "bccks nodokeshi", 109 | "raw_url": "https://gist.github.com/raw/17797/813610f26c89313ac1a1946b794e8f7b153e0988/bccks nodokeshi", 110 | "size": 126, 111 | "language": null 112 | } 113 | }, 114 | "public": true, 115 | "git_push_url": "git@gist.github.com:17797.git", 116 | "created_at": "2008-10-19T08:25:21Z", 117 | "id": "17797", 118 | "url": "https://api.github.com/gists/17797", 119 | "user": { 120 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 121 | "login": "swdyh", 122 | "url": "https://api.github.com/users/swdyh", 123 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 124 | "id": 9168 125 | }, 126 | "html_url": "https://gist.github.com/17797" 127 | }, 128 | { 129 | "description": null, 130 | "updated_at": "2009-10-14T11:58:07Z", 131 | "git_pull_url": "git://gist.github.com/13833.git", 132 | "comments": 0, 133 | "files": { 134 | "ldr_-_twittericon.user.js": { 135 | "type": "application/javascript", 136 | "filename": "ldr_-_twittericon.user.js", 137 | "raw_url": "https://gist.github.com/raw/13833/5effcc65f1447b3d765adba3e86f6456d9a5883f/ldr_-_twittericon.user.js", 138 | "size": 1623, 139 | "language": "JavaScript" 140 | } 141 | }, 142 | "public": true, 143 | "git_push_url": "git@gist.github.com:13833.git", 144 | "created_at": "2008-09-30T14:35:57Z", 145 | "id": "13833", 146 | "url": "https://api.github.com/gists/13833", 147 | "user": { 148 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 149 | "login": "swdyh", 150 | "url": "https://api.github.com/users/swdyh", 151 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 152 | "id": 9168 153 | }, 154 | "html_url": "https://gist.github.com/13833" 155 | }, 156 | { 157 | "description": null, 158 | "updated_at": "2009-10-14T11:51:22Z", 159 | "git_pull_url": "git://gist.github.com/11863.git", 160 | "comments": 0, 161 | "files": { 162 | "fashionsnap_enlarge_images.user.js": { 163 | "type": "application/javascript", 164 | "filename": "fashionsnap_enlarge_images.user.js", 165 | "raw_url": "https://gist.github.com/raw/11863/1d1e6e3a4dc70c1a24b07a80265f908262854a88/fashionsnap_enlarge_images.user.js", 166 | "size": 425, 167 | "language": "JavaScript" 168 | } 169 | }, 170 | "public": true, 171 | "git_push_url": "git@gist.github.com:11863.git", 172 | "created_at": "2008-09-21T11:58:31Z", 173 | "id": "11863", 174 | "url": "https://api.github.com/gists/11863", 175 | "user": { 176 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 177 | "login": "swdyh", 178 | "url": "https://api.github.com/users/swdyh", 179 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 180 | "id": 9168 181 | }, 182 | "html_url": "https://gist.github.com/11863" 183 | }, 184 | { 185 | "description": null, 186 | "updated_at": "2009-10-14T11:49:56Z", 187 | "git_pull_url": "git://gist.github.com/11423.git", 188 | "comments": 0, 189 | "files": { 190 | "hatenakeyword.user.css": { 191 | "type": "text/css", 192 | "filename": "hatenakeyword.user.css", 193 | "raw_url": "https://gist.github.com/raw/11423/993d64cbd54dd1b42cb5c4ddec5834a215643b13/hatenakeyword.user.css", 194 | "size": 201, 195 | "language": "CSS" 196 | } 197 | }, 198 | "public": true, 199 | "git_push_url": "git@gist.github.com:11423.git", 200 | "created_at": "2008-09-18T11:36:58Z", 201 | "id": "11423", 202 | "url": "https://api.github.com/gists/11423", 203 | "user": { 204 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 205 | "login": "swdyh", 206 | "url": "https://api.github.com/users/swdyh", 207 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 208 | "id": 9168 209 | }, 210 | "html_url": "https://gist.github.com/11423" 211 | }, 212 | { 213 | "description": null, 214 | "updated_at": "2009-10-14T11:49:03Z", 215 | "git_pull_url": "git://gist.github.com/11198.git", 216 | "comments": 0, 217 | "files": { 218 | "userstyle for twitter home": { 219 | "type": "text/plain", 220 | "filename": "userstyle for twitter home", 221 | "raw_url": "https://gist.github.com/raw/11198/8865c4e11bb72a26db7d0e9e250dff22a0e6341c/userstyle for twitter home", 222 | "size": 547, 223 | "language": null 224 | } 225 | }, 226 | "public": true, 227 | "git_push_url": "git@gist.github.com:11198.git", 228 | "created_at": "2008-09-17T05:30:37Z", 229 | "id": "11198", 230 | "url": "https://api.github.com/gists/11198", 231 | "user": { 232 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 233 | "login": "swdyh", 234 | "url": "https://api.github.com/users/swdyh", 235 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 236 | "id": 9168 237 | }, 238 | "html_url": "https://gist.github.com/11198" 239 | }, 240 | { 241 | "description": null, 242 | "updated_at": "2009-10-14T11:35:00Z", 243 | "git_pull_url": "git://gist.github.com/7205.git", 244 | "comments": 0, 245 | "files": { 246 | "Github-shirts": { 247 | "type": "text/plain", 248 | "filename": "Github-shirts", 249 | "raw_url": "https://gist.github.com/raw/7205/1f5044db67b66867bb7ec08e28adc77bb19892a4/Github-shirts", 250 | "size": 300, 251 | "language": null 252 | } 253 | }, 254 | "public": true, 255 | "git_push_url": "git@gist.github.com:7205.git", 256 | "created_at": "2008-08-26T04:02:27Z", 257 | "id": "7205", 258 | "url": "https://api.github.com/gists/7205", 259 | "user": { 260 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 261 | "login": "swdyh", 262 | "url": "https://api.github.com/users/swdyh", 263 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 264 | "id": 9168 265 | }, 266 | "html_url": "https://gist.github.com/7205" 267 | }, 268 | { 269 | "description": null, 270 | "updated_at": "2009-10-14T11:35:00Z", 271 | "git_pull_url": "git://gist.github.com/7204.git", 272 | "comments": 0, 273 | "files": { 274 | 275 | }, 276 | "public": true, 277 | "git_push_url": "git@gist.github.com:7204.git", 278 | "created_at": "2008-08-26T04:01:28Z", 279 | "id": "7204", 280 | "url": "https://api.github.com/gists/7204", 281 | "user": { 282 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 283 | "login": "swdyh", 284 | "url": "https://api.github.com/users/swdyh", 285 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 286 | "id": 9168 287 | }, 288 | "html_url": "https://gist.github.com/7204" 289 | }, 290 | { 291 | "description": null, 292 | "updated_at": "2009-10-14T11:33:59Z", 293 | "git_pull_url": "git://gist.github.com/6938.git", 294 | "comments": 0, 295 | "files": { 296 | "lightbox.js": { 297 | "type": "application/javascript", 298 | "filename": "lightbox.js", 299 | "raw_url": "https://gist.github.com/raw/6938/8b14e431656c3e47f81da8426c2df42378b563da/lightbox.js", 300 | "size": 222, 301 | "language": "JavaScript" 302 | } 303 | }, 304 | "public": true, 305 | "git_push_url": "git@gist.github.com:6938.git", 306 | "created_at": "2008-08-23T20:21:34Z", 307 | "id": "6938", 308 | "url": "https://api.github.com/gists/6938", 309 | "user": { 310 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 311 | "login": "swdyh", 312 | "url": "https://api.github.com/users/swdyh", 313 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 314 | "id": 9168 315 | }, 316 | "html_url": "https://gist.github.com/6938" 317 | }, 318 | { 319 | "description": null, 320 | "updated_at": "2009-10-14T11:21:36Z", 321 | "git_pull_url": "git://gist.github.com/3668.git", 322 | "comments": 0, 323 | "files": { 324 | "hhcode.js": { 325 | "type": "application/javascript", 326 | "filename": "hhcode.js", 327 | "raw_url": "https://gist.github.com/raw/3668/ff1f59509325dc3c548796b9812a8b004cb90eaf/hhcode.js", 328 | "size": 4838, 329 | "language": "JavaScript" 330 | } 331 | }, 332 | "public": true, 333 | "git_push_url": "git@gist.github.com:3668.git", 334 | "created_at": "2008-08-01T19:15:00Z", 335 | "id": "3668", 336 | "url": "https://api.github.com/gists/3668", 337 | "user": { 338 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 339 | "login": "swdyh", 340 | "url": "https://api.github.com/users/swdyh", 341 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 342 | "id": 9168 343 | }, 344 | "html_url": "https://gist.github.com/3668" 345 | } 346 | ] 347 | -------------------------------------------------------------------------------- /test/fixtures/gists_2: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx/1.0.13 3 | Date: Wed, 21 Mar 2012 12:24:55 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 5000 8 | ETag: "284ee7d56c096d748fc69808b814e09a" 9 | X-OAuth-Scopes: gist 10 | Link: ; rel="next", ; rel="last", ; rel="first", ; rel="prev" 11 | X-RateLimit-Remaining: 4992 12 | Content-Length: 31198 13 | X-Accepted-OAuth-Scopes: gist 14 | 15 | [ 16 | { 17 | "url": "https://api.github.com/gists/214294", 18 | "user": { 19 | "url": "https://api.github.com/users/swdyh", 20 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 21 | "login": "swdyh", 22 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 23 | "id": 9168 24 | }, 25 | "created_at": "2009-10-20T14:45:25Z", 26 | "public": true, 27 | "description": null, 28 | "html_url": "https://gist.github.com/214294", 29 | "git_pull_url": "git://gist.github.com/214294.git", 30 | "files": { 31 | "mime.types": { 32 | "type": "text/plain", 33 | "language": null, 34 | "raw_url": "https://gist.github.com/raw/214294/9f61f4b4a0acc3f10d70b74067725cd36d177197/mime.types", 35 | "size": 63, 36 | "filename": "mime.types" 37 | } 38 | }, 39 | "git_push_url": "git@gist.github.com:214294.git", 40 | "id": "214294", 41 | "comments": 0, 42 | "updated_at": "2009-10-20T14:45:25Z" 43 | }, 44 | { 45 | "url": "https://api.github.com/gists/198829", 46 | "user": { 47 | "url": "https://api.github.com/users/swdyh", 48 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 49 | "login": "swdyh", 50 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 51 | "id": 9168 52 | }, 53 | "created_at": "2009-10-01T08:26:15Z", 54 | "public": true, 55 | "description": null, 56 | "html_url": "https://gist.github.com/198829", 57 | "git_pull_url": "git://gist.github.com/198829.git", 58 | "files": { 59 | "yks.rb": { 60 | "type": "application/ruby", 61 | "language": "Ruby", 62 | "raw_url": "https://gist.github.com/raw/198829/ee397f3209d5c64ff3155109e86bbf79046aaafc/yks.rb", 63 | "size": 853, 64 | "filename": "yks.rb" 65 | } 66 | }, 67 | "git_push_url": "git@gist.github.com:198829.git", 68 | "id": "198829", 69 | "comments": 0, 70 | "updated_at": "2009-10-16T10:17:31Z" 71 | }, 72 | { 73 | "url": "https://api.github.com/gists/184621", 74 | "user": { 75 | "url": "https://api.github.com/users/swdyh", 76 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 77 | "login": "swdyh", 78 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 79 | "id": 9168 80 | }, 81 | "created_at": "2009-09-10T15:59:58Z", 82 | "public": true, 83 | "description": null, 84 | "html_url": "https://gist.github.com/184621", 85 | "git_pull_url": "git://gist.github.com/184621.git", 86 | "files": { 87 | "test_post_form.rb": { 88 | "type": "application/ruby", 89 | "language": "Ruby", 90 | "raw_url": "https://gist.github.com/raw/184621/2e3a879a3447e5f16e3598e905947dc9f3c8658d/test_post_form.rb", 91 | "size": 298, 92 | "filename": "test_post_form.rb" 93 | } 94 | }, 95 | "git_push_url": "git@gist.github.com:184621.git", 96 | "id": "184621", 97 | "comments": 0, 98 | "updated_at": "2009-10-14T11:20:27Z" 99 | }, 100 | { 101 | "url": "https://api.github.com/gists/176895", 102 | "user": { 103 | "url": "https://api.github.com/users/swdyh", 104 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 105 | "login": "swdyh", 106 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 107 | "id": 9168 108 | }, 109 | "created_at": "2009-08-28T10:42:44Z", 110 | "public": true, 111 | "description": null, 112 | "html_url": "https://gist.github.com/176895", 113 | "git_pull_url": "git://gist.github.com/176895.git", 114 | "files": { 115 | "embed_typograffit.user.js": { 116 | "type": "application/javascript", 117 | "language": "JavaScript", 118 | "raw_url": "https://gist.github.com/raw/176895/b8941f8d606fa546ff740acee0cb826dc1243caa/embed_typograffit.user.js", 119 | "size": 2013, 120 | "filename": "embed_typograffit.user.js" 121 | } 122 | }, 123 | "git_push_url": "git@gist.github.com:176895.git", 124 | "id": "176895", 125 | "comments": 0, 126 | "updated_at": "2009-10-14T11:20:27Z" 127 | }, 128 | { 129 | "url": "https://api.github.com/gists/175595", 130 | "user": { 131 | "url": "https://api.github.com/users/swdyh", 132 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 133 | "login": "swdyh", 134 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 135 | "id": 9168 136 | }, 137 | "created_at": "2009-08-26T15:50:42Z", 138 | "public": true, 139 | "description": null, 140 | "html_url": "https://gist.github.com/175595", 141 | "git_pull_url": "git://gist.github.com/175595.git", 142 | "files": { 143 | "muji09aw": { 144 | "type": "text/plain", 145 | "language": null, 146 | "raw_url": "https://gist.github.com/raw/175595/bc1f94efe4504b2702ca2c46279a2d44e634ab00/muji09aw", 147 | "size": 194, 148 | "filename": "muji09aw" 149 | } 150 | }, 151 | "git_push_url": "git@gist.github.com:175595.git", 152 | "id": "175595", 153 | "comments": 0, 154 | "updated_at": "2009-10-14T11:20:27Z" 155 | }, 156 | { 157 | "url": "https://api.github.com/gists/169120", 158 | "user": { 159 | "url": "https://api.github.com/users/swdyh", 160 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 161 | "login": "swdyh", 162 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 163 | "id": 9168 164 | }, 165 | "created_at": "2009-08-17T13:36:50Z", 166 | "public": true, 167 | "description": null, 168 | "html_url": "https://gist.github.com/169120", 169 | "git_pull_url": "git://gist.github.com/169120.git", 170 | "files": { 171 | "inspect_contextmenu.js": { 172 | "type": "application/javascript", 173 | "language": "JavaScript", 174 | "raw_url": "https://gist.github.com/raw/169120/7ee5e0dcdf7cc368e4b77c50421a34201f9760fa/inspect_contextmenu.js", 175 | "size": 4363, 176 | "filename": "inspect_contextmenu.js" 177 | } 178 | }, 179 | "git_push_url": "git@gist.github.com:169120.git", 180 | "id": "169120", 181 | "comments": 0, 182 | "updated_at": "2009-10-16T11:57:38Z" 183 | }, 184 | { 185 | "url": "https://api.github.com/gists/167744", 186 | "user": { 187 | "url": "https://api.github.com/users/swdyh", 188 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 189 | "login": "swdyh", 190 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 191 | "id": 9168 192 | }, 193 | "created_at": "2009-08-14T10:04:51Z", 194 | "public": true, 195 | "description": null, 196 | "html_url": "https://gist.github.com/167744", 197 | "git_pull_url": "git://gist.github.com/167744.git", 198 | "files": { 199 | "lvls": { 200 | "type": "text/plain", 201 | "language": null, 202 | "raw_url": "https://gist.github.com/raw/167744/26343bb5471988675f26b00ee66d06c9d59b928e/lvls", 203 | "size": 299, 204 | "filename": "lvls" 205 | } 206 | }, 207 | "git_push_url": "git@gist.github.com:167744.git", 208 | "id": "167744", 209 | "comments": 0, 210 | "updated_at": "2009-10-14T11:20:28Z" 211 | }, 212 | { 213 | "url": "https://api.github.com/gists/166421", 214 | "user": { 215 | "url": "https://api.github.com/users/swdyh", 216 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 217 | "login": "swdyh", 218 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 219 | "id": 9168 220 | }, 221 | "created_at": "2009-08-12T09:40:31Z", 222 | "public": true, 223 | "description": null, 224 | "html_url": "https://gist.github.com/166421", 225 | "git_pull_url": "git://gist.github.com/166421.git", 226 | "files": { 227 | "em_glitch_proxy.rb": { 228 | "type": "application/ruby", 229 | "language": "Ruby", 230 | "raw_url": "https://gist.github.com/raw/166421/236ec0681c35e37d66538dda33ac713c1034a9a7/em_glitch_proxy.rb", 231 | "size": 1464, 232 | "filename": "em_glitch_proxy.rb" 233 | } 234 | }, 235 | "git_push_url": "git@gist.github.com:166421.git", 236 | "id": "166421", 237 | "comments": 0, 238 | "updated_at": "2009-10-14T11:20:28Z" 239 | }, 240 | { 241 | "url": "https://api.github.com/gists/146093", 242 | "user": { 243 | "url": "https://api.github.com/users/swdyh", 244 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 245 | "login": "swdyh", 246 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 247 | "id": 9168 248 | }, 249 | "created_at": "2009-07-13T12:49:57Z", 250 | "public": true, 251 | "description": null, 252 | "html_url": "https://gist.github.com/146093", 253 | "git_pull_url": "git://gist.github.com/146093.git", 254 | "files": { 255 | "autopagerizegoogleimagef.user.js": { 256 | "type": "application/javascript", 257 | "language": "JavaScript", 258 | "raw_url": "https://gist.github.com/raw/146093/82b6ce4d6568a66ef855fed622b1ce9133ef2c60/autopagerizegoogleimagef.user.js", 259 | "size": 826, 260 | "filename": "autopagerizegoogleimagef.user.js" 261 | } 262 | }, 263 | "git_push_url": "git@gist.github.com:146093.git", 264 | "id": "146093", 265 | "comments": 0, 266 | "updated_at": "2009-10-14T11:20:28Z" 267 | }, 268 | { 269 | "url": "https://api.github.com/gists/115874", 270 | "user": { 271 | "url": "https://api.github.com/users/swdyh", 272 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 273 | "login": "swdyh", 274 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 275 | "id": 9168 276 | }, 277 | "created_at": "2009-05-22T02:06:29Z", 278 | "public": true, 279 | "description": null, 280 | "html_url": "https://gist.github.com/115874", 281 | "git_pull_url": "git://gist.github.com/115874.git", 282 | "files": { 283 | "jetpack_tweet.js": { 284 | "type": "application/javascript", 285 | "language": "JavaScript", 286 | "raw_url": "https://gist.github.com/raw/115874/8405f5044ab6efd130b9ba9d3ab9e1fc55c84afb/jetpack_tweet.js", 287 | "size": 555, 288 | "filename": "jetpack_tweet.js" 289 | } 290 | }, 291 | "git_push_url": "git@gist.github.com:115874.git", 292 | "id": "115874", 293 | "comments": 0, 294 | "updated_at": "2009-10-14T11:20:28Z" 295 | }, 296 | { 297 | "url": "https://api.github.com/gists/107915", 298 | "user": { 299 | "url": "https://api.github.com/users/swdyh", 300 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 301 | "login": "swdyh", 302 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 303 | "id": 9168 304 | }, 305 | "created_at": "2009-05-07T04:31:07Z", 306 | "public": true, 307 | "description": null, 308 | "html_url": "https://gist.github.com/107915", 309 | "git_pull_url": "git://gist.github.com/107915.git", 310 | "files": { 311 | "autopagerizetwitterfilte.user.js": { 312 | "type": "application/javascript", 313 | "language": "JavaScript", 314 | "raw_url": "https://gist.github.com/raw/107915/acd635f5da210bd2f82d82a7abb237efac9f739e/autopagerizetwitterfilte.user.js", 315 | "size": 939, 316 | "filename": "autopagerizetwitterfilte.user.js" 317 | } 318 | }, 319 | "git_push_url": "git@gist.github.com:107915.git", 320 | "id": "107915", 321 | "comments": 0, 322 | "updated_at": "2009-10-14T11:20:28Z" 323 | }, 324 | { 325 | "url": "https://api.github.com/gists/97062", 326 | "user": { 327 | "url": "https://api.github.com/users/swdyh", 328 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 329 | "login": "swdyh", 330 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 331 | "id": 9168 332 | }, 333 | "created_at": "2009-04-17T14:36:40Z", 334 | "public": true, 335 | "description": null, 336 | "html_url": "https://gist.github.com/97062", 337 | "git_pull_url": "git://gist.github.com/97062.git", 338 | "files": { 339 | "post_tumblr.rb": { 340 | "type": "application/ruby", 341 | "language": "Ruby", 342 | "raw_url": "https://gist.github.com/raw/97062/8ce93bdf02b43245e54b9d20e5c7ced60af112ce/post_tumblr.rb", 343 | "size": 582, 344 | "filename": "post_tumblr.rb" 345 | } 346 | }, 347 | "git_push_url": "git@gist.github.com:97062.git", 348 | "id": "97062", 349 | "comments": 0, 350 | "updated_at": "2009-10-16T20:18:43Z" 351 | }, 352 | { 353 | "url": "https://api.github.com/gists/97052", 354 | "user": { 355 | "url": "https://api.github.com/users/swdyh", 356 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 357 | "login": "swdyh", 358 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 359 | "id": 9168 360 | }, 361 | "created_at": "2009-04-17T14:22:35Z", 362 | "public": true, 363 | "description": null, 364 | "html_url": "https://gist.github.com/97052", 365 | "git_pull_url": "git://gist.github.com/97052.git", 366 | "files": { 367 | "url2img.user.js": { 368 | "type": "application/javascript", 369 | "language": "JavaScript", 370 | "raw_url": "https://gist.github.com/raw/97052/d93fb6127b8b27e9354e1300ecdc0c7e7dd19381/url2img.user.js", 371 | "size": 2189, 372 | "filename": "url2img.user.js" 373 | } 374 | }, 375 | "git_push_url": "git@gist.github.com:97052.git", 376 | "id": "97052", 377 | "comments": 0, 378 | "updated_at": "2009-10-14T11:20:29Z" 379 | }, 380 | { 381 | "url": "https://api.github.com/gists/93524", 382 | "user": { 383 | "url": "https://api.github.com/users/swdyh", 384 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 385 | "login": "swdyh", 386 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 387 | "id": 9168 388 | }, 389 | "created_at": "2009-04-11T10:39:44Z", 390 | "public": true, 391 | "description": null, 392 | "html_url": "https://gist.github.com/93524", 393 | "git_pull_url": "git://gist.github.com/93524.git", 394 | "files": { 395 | "pixnet.js": { 396 | "type": "application/javascript", 397 | "language": "JavaScript", 398 | "raw_url": "https://gist.github.com/raw/93524/07443c94d36df17cf8490f271bee763ee36d57c3/pixnet.js", 399 | "size": 2201, 400 | "filename": "pixnet.js" 401 | } 402 | }, 403 | "git_push_url": "git@gist.github.com:93524.git", 404 | "id": "93524", 405 | "comments": 0, 406 | "updated_at": "2009-10-16T21:02:59Z" 407 | }, 408 | { 409 | "url": "https://api.github.com/gists/77088", 410 | "user": { 411 | "url": "https://api.github.com/users/swdyh", 412 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 413 | "login": "swdyh", 414 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 415 | "id": 9168 416 | }, 417 | "created_at": "2009-03-10T19:32:08Z", 418 | "public": true, 419 | "description": null, 420 | "html_url": "https://gist.github.com/77088", 421 | "git_pull_url": "git://gist.github.com/77088.git", 422 | "files": { 423 | "ldr_-_githubicon.user.js": { 424 | "type": "application/javascript", 425 | "language": "JavaScript", 426 | "raw_url": "https://gist.github.com/raw/77088/589fb54370a4ecdb1fafad29e178581c9e656708/ldr_-_githubicon.user.js", 427 | "size": 1506, 428 | "filename": "ldr_-_githubicon.user.js" 429 | } 430 | }, 431 | "git_push_url": "git@gist.github.com:77088.git", 432 | "id": "77088", 433 | "comments": 0, 434 | "updated_at": "2009-10-14T11:20:29Z" 435 | }, 436 | { 437 | "url": "https://api.github.com/gists/74962", 438 | "user": { 439 | "url": "https://api.github.com/users/swdyh", 440 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 441 | "login": "swdyh", 442 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 443 | "id": 9168 444 | }, 445 | "created_at": "2009-03-06T16:19:25Z", 446 | "public": true, 447 | "description": null, 448 | "html_url": "https://gist.github.com/74962", 449 | "git_pull_url": "git://gist.github.com/74962.git", 450 | "files": { 451 | "context_nemu_reduce.user.css": { 452 | "type": "text/css", 453 | "language": "CSS", 454 | "raw_url": "https://gist.github.com/raw/74962/cfb737c32cb10f41a465c807bf8fa1b3e9be1315/context_nemu_reduce.user.css", 455 | "size": 483, 456 | "filename": "context_nemu_reduce.user.css" 457 | } 458 | }, 459 | "git_push_url": "git@gist.github.com:74962.git", 460 | "id": "74962", 461 | "comments": 0, 462 | "updated_at": "2009-10-14T11:20:29Z" 463 | }, 464 | { 465 | "url": "https://api.github.com/gists/69693", 466 | "user": { 467 | "url": "https://api.github.com/users/swdyh", 468 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 469 | "login": "swdyh", 470 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 471 | "id": 9168 472 | }, 473 | "created_at": "2009-02-24T18:08:42Z", 474 | "public": true, 475 | "description": null, 476 | "html_url": "https://gist.github.com/69693", 477 | "git_pull_url": "git://gist.github.com/69693.git", 478 | "files": { 479 | "d_ap.rb": { 480 | "type": "application/ruby", 481 | "language": "Ruby", 482 | "raw_url": "https://gist.github.com/raw/69693/79e4ebeb170446ac5eab94c339aea25aacc1114b/d_ap.rb", 483 | "size": 2162, 484 | "filename": "d_ap.rb" 485 | } 486 | }, 487 | "git_push_url": "git@gist.github.com:69693.git", 488 | "id": "69693", 489 | "comments": 0, 490 | "updated_at": "2009-10-14T11:20:30Z" 491 | }, 492 | { 493 | "url": "https://api.github.com/gists/62135", 494 | "user": { 495 | "url": "https://api.github.com/users/swdyh", 496 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 497 | "login": "swdyh", 498 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 499 | "id": 9168 500 | }, 501 | "created_at": "2009-02-11T17:43:07Z", 502 | "public": true, 503 | "description": null, 504 | "html_url": "https://gist.github.com/62135", 505 | "git_pull_url": "git://gist.github.com/62135.git", 506 | "files": { 507 | "muji2009ss_w.rb": { 508 | "type": "application/ruby", 509 | "language": "Ruby", 510 | "raw_url": "https://gist.github.com/raw/62135/dfb3f013fbe2fda83dee5ef42576076a8b22707e/muji2009ss_w.rb", 511 | "size": 637, 512 | "filename": "muji2009ss_w.rb" 513 | } 514 | }, 515 | "git_push_url": "git@gist.github.com:62135.git", 516 | "id": "62135", 517 | "comments": 0, 518 | "updated_at": "2009-10-14T11:20:30Z" 519 | }, 520 | { 521 | "url": "https://api.github.com/gists/53445", 522 | "user": { 523 | "url": "https://api.github.com/users/swdyh", 524 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 525 | "login": "swdyh", 526 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 527 | "id": 9168 528 | }, 529 | "created_at": "2009-01-27T17:54:44Z", 530 | "public": true, 531 | "description": null, 532 | "html_url": "https://gist.github.com/53445", 533 | "git_pull_url": "git://gist.github.com/53445.git", 534 | "files": { 535 | "gist.pl.rb": { 536 | "type": "application/ruby", 537 | "language": "Ruby", 538 | "raw_url": "https://gist.github.com/raw/53445/ef60b8a788f32e8643b3dd4bed757c8d95d5996e/gist.pl.rb", 539 | "size": 390, 540 | "filename": "gist.pl.rb" 541 | } 542 | }, 543 | "git_push_url": "git@gist.github.com:53445.git", 544 | "id": "53445", 545 | "comments": 0, 546 | "updated_at": "2009-10-14T11:20:30Z" 547 | }, 548 | { 549 | "url": "https://api.github.com/gists/47877", 550 | "user": { 551 | "url": "https://api.github.com/users/swdyh", 552 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 553 | "login": "swdyh", 554 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 555 | "id": 9168 556 | }, 557 | "created_at": "2009-01-16T08:41:46Z", 558 | "public": true, 559 | "description": null, 560 | "html_url": "https://gist.github.com/47877", 561 | "git_pull_url": "git://gist.github.com/47877.git", 562 | "files": { 563 | "favicon.html": { 564 | "type": "text/html", 565 | "language": "HTML", 566 | "raw_url": "https://gist.github.com/raw/47877/1eaa2b1c6a59d707b45b98c293426db8220b5bf0/favicon.html", 567 | "size": 1296, 568 | "filename": "favicon.html" 569 | } 570 | }, 571 | "git_push_url": "git@gist.github.com:47877.git", 572 | "id": "47877", 573 | "comments": 0, 574 | "updated_at": "2009-10-14T11:20:30Z" 575 | }, 576 | { 577 | "url": "https://api.github.com/gists/36121", 578 | "user": { 579 | "url": "https://api.github.com/users/swdyh", 580 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 581 | "login": "swdyh", 582 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 583 | "id": 9168 584 | }, 585 | "created_at": "2008-12-15T22:35:38Z", 586 | "public": true, 587 | "description": null, 588 | "html_url": "https://gist.github.com/36121", 589 | "git_pull_url": "git://gist.github.com/36121.git", 590 | "files": { 591 | "motsu.user.css": { 592 | "type": "text/css", 593 | "language": "CSS", 594 | "raw_url": "https://gist.github.com/raw/36121/0b2b46842371c0c4efacf08ca5b372aee30eef3e/motsu.user.css", 595 | "size": 165, 596 | "filename": "motsu.user.css" 597 | } 598 | }, 599 | "git_push_url": "git@gist.github.com:36121.git", 600 | "id": "36121", 601 | "comments": 0, 602 | "updated_at": "2009-10-14T11:20:31Z" 603 | }, 604 | { 605 | "url": "https://api.github.com/gists/35857", 606 | "user": { 607 | "url": "https://api.github.com/users/swdyh", 608 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 609 | "login": "swdyh", 610 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 611 | "id": 9168 612 | }, 613 | "created_at": "2008-12-15T03:28:59Z", 614 | "public": true, 615 | "description": null, 616 | "html_url": "https://gist.github.com/35857", 617 | "git_pull_url": "git://gist.github.com/35857.git", 618 | "files": { 619 | "tabs.js": { 620 | "type": "application/javascript", 621 | "language": "JavaScript", 622 | "raw_url": "https://gist.github.com/raw/35857/8d74d0a795efa31d71ec89c69eab73f1ed283ba2/tabs.js", 623 | "size": 4072, 624 | "filename": "tabs.js" 625 | } 626 | }, 627 | "git_push_url": "git@gist.github.com:35857.git", 628 | "id": "35857", 629 | "comments": 0, 630 | "updated_at": "2009-10-14T15:33:22Z" 631 | }, 632 | { 633 | "url": "https://api.github.com/gists/34819", 634 | "user": { 635 | "url": "https://api.github.com/users/swdyh", 636 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 637 | "login": "swdyh", 638 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 639 | "id": 9168 640 | }, 641 | "created_at": "2008-12-11T18:53:11Z", 642 | "public": true, 643 | "description": null, 644 | "html_url": "https://gist.github.com/34819", 645 | "git_pull_url": "git://gist.github.com/34819.git", 646 | "files": { 647 | "regexp_safe.js": { 648 | "type": "application/javascript", 649 | "language": "JavaScript", 650 | "raw_url": "https://gist.github.com/raw/34819/84faef5dfc9bbe3ea10bc50a47215b1d2f5212db/regexp_safe.js", 651 | "size": 1305, 652 | "filename": "regexp_safe.js" 653 | }, 654 | "regexp_safe.html": { 655 | "type": "text/html", 656 | "language": "HTML", 657 | "raw_url": "https://gist.github.com/raw/34819/83bbc79fef084d1ac8b5d8f6eadfcd0a87fca680/regexp_safe.html", 658 | "size": 873, 659 | "filename": "regexp_safe.html" 660 | } 661 | }, 662 | "git_push_url": "git@gist.github.com:34819.git", 663 | "id": "34819", 664 | "comments": 0, 665 | "updated_at": "2009-10-14T15:33:22Z" 666 | }, 667 | { 668 | "url": "https://api.github.com/gists/31787", 669 | "user": { 670 | "url": "https://api.github.com/users/swdyh", 671 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 672 | "login": "swdyh", 673 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 674 | "id": 9168 675 | }, 676 | "created_at": "2008-12-04T00:32:34Z", 677 | "public": true, 678 | "description": null, 679 | "html_url": "https://gist.github.com/31787", 680 | "git_pull_url": "git://gist.github.com/31787.git", 681 | "files": { 682 | "resolve_path_test.html": { 683 | "type": "text/html", 684 | "language": "HTML", 685 | "raw_url": "https://gist.github.com/raw/31787/8c53e8c97d60177dfbeff491908f2bb137d49db2/resolve_path_test.html", 686 | "size": 4335, 687 | "filename": "resolve_path_test.html" 688 | } 689 | }, 690 | "git_push_url": "git@gist.github.com:31787.git", 691 | "id": "31787", 692 | "comments": 0, 693 | "updated_at": "2009-10-14T15:33:22Z" 694 | }, 695 | { 696 | "url": "https://api.github.com/gists/bc82698ab357bd8bb433", 697 | "user": { 698 | "url": "https://api.github.com/users/swdyh", 699 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 700 | "login": "swdyh", 701 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 702 | "id": 9168 703 | }, 704 | "created_at": "2008-11-29T23:11:52Z", 705 | "public": false, 706 | "description": null, 707 | "html_url": "https://gist.github.com/bc82698ab357bd8bb433", 708 | "git_pull_url": "git://gist.github.com/bc82698ab357bd8bb433.git", 709 | "files": { 710 | "_gisty": { 711 | "type": "text/plain", 712 | "language": null, 713 | "raw_url": "https://gist.github.com/raw/bc82698ab357bd8bb433/70eb6eef648dd77240aca6d3ede4dd26a9ce82ac/_gisty", 714 | "size": 128, 715 | "filename": "_gisty" 716 | } 717 | }, 718 | "git_push_url": "git@gist.github.com:bc82698ab357bd8bb433.git", 719 | "id": "bc82698ab357bd8bb433", 720 | "comments": 0, 721 | "updated_at": "2009-11-02T09:08:28Z" 722 | }, 723 | { 724 | "url": "https://api.github.com/gists/30080", 725 | "user": { 726 | "url": "https://api.github.com/users/swdyh", 727 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 728 | "login": "swdyh", 729 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 730 | "id": 9168 731 | }, 732 | "created_at": "2008-11-28T20:20:29Z", 733 | "public": true, 734 | "description": null, 735 | "html_url": "https://gist.github.com/30080", 736 | "git_pull_url": "git://gist.github.com/30080.git", 737 | "files": { 738 | "ldr_-_exblog_filter.user.js": { 739 | "type": "application/javascript", 740 | "language": "JavaScript", 741 | "raw_url": "https://gist.github.com/raw/30080/65f15d47f1452a7737490ed9a22e32926d1ede9d/ldr_-_exblog_filter.user.js", 742 | "size": 1298, 743 | "filename": "ldr_-_exblog_filter.user.js" 744 | } 745 | }, 746 | "git_push_url": "git@gist.github.com:30080.git", 747 | "id": "30080", 748 | "comments": 0, 749 | "updated_at": "2009-10-14T15:33:23Z" 750 | }, 751 | { 752 | "url": "https://api.github.com/gists/24835", 753 | "user": { 754 | "url": "https://api.github.com/users/swdyh", 755 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 756 | "login": "swdyh", 757 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 758 | "id": 9168 759 | }, 760 | "created_at": "2008-11-14T09:20:53Z", 761 | "public": true, 762 | "description": null, 763 | "html_url": "https://gist.github.com/24835", 764 | "git_pull_url": "git://gist.github.com/24835.git", 765 | "files": { 766 | "delicious_hide_do_not_share.user.css": { 767 | "type": "text/css", 768 | "language": "CSS", 769 | "raw_url": "https://gist.github.com/raw/24835/43a86b56175c85f452af3fca4ce0df0997ff3bc2/delicious_hide_do_not_share.user.css", 770 | "size": 140, 771 | "filename": "delicious_hide_do_not_share.user.css" 772 | } 773 | }, 774 | "git_push_url": "git@gist.github.com:24835.git", 775 | "id": "24835", 776 | "comments": 0, 777 | "updated_at": "2009-10-14T15:33:23Z" 778 | }, 779 | { 780 | "url": "https://api.github.com/gists/22851", 781 | "user": { 782 | "url": "https://api.github.com/users/swdyh", 783 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 784 | "login": "swdyh", 785 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 786 | "id": 9168 787 | }, 788 | "created_at": "2008-11-07T12:51:29Z", 789 | "public": true, 790 | "description": null, 791 | "html_url": "https://gist.github.com/22851", 792 | "git_pull_url": "git://gist.github.com/22851.git", 793 | "files": { 794 | "gistfile1": { 795 | "type": "text/plain", 796 | "language": null, 797 | "raw_url": "https://gist.github.com/raw/22851/626b3e62bf2b1d690608c17383e669c17c6085c4/gistfile1", 798 | "size": 434, 799 | "filename": "gistfile1" 800 | } 801 | }, 802 | "git_push_url": "git@gist.github.com:22851.git", 803 | "id": "22851", 804 | "comments": 0, 805 | "updated_at": "2009-10-14T15:33:23Z" 806 | }, 807 | { 808 | "url": "https://api.github.com/gists/21414", 809 | "user": { 810 | "url": "https://api.github.com/users/swdyh", 811 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 812 | "login": "swdyh", 813 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 814 | "id": 9168 815 | }, 816 | "created_at": "2008-10-31T20:34:54Z", 817 | "public": true, 818 | "description": null, 819 | "html_url": "https://gist.github.com/21414", 820 | "git_pull_url": "git://gist.github.com/21414.git", 821 | "files": { 822 | "gist_id.rb": { 823 | "type": "application/ruby", 824 | "language": "Ruby", 825 | "raw_url": "https://gist.github.com/raw/21414/6581906b6cb4a76c88517e609b4ffd9ec4f9f848/gist_id.rb", 826 | "size": 1046, 827 | "filename": "gist_id.rb" 828 | } 829 | }, 830 | "git_push_url": "git@gist.github.com:21414.git", 831 | "id": "21414", 832 | "comments": 0, 833 | "updated_at": "2009-10-14T15:33:23Z" 834 | }, 835 | { 836 | "url": "https://api.github.com/gists/21393", 837 | "user": { 838 | "url": "https://api.github.com/users/swdyh", 839 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 840 | "login": "swdyh", 841 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 842 | "id": 9168 843 | }, 844 | "created_at": "2008-10-31T18:58:09Z", 845 | "public": true, 846 | "description": null, 847 | "html_url": "https://gist.github.com/21393", 848 | "git_pull_url": "git://gist.github.com/21393.git", 849 | "files": { 850 | "gistfile1": { 851 | "type": "text/plain", 852 | "language": null, 853 | "raw_url": "https://gist.github.com/raw/21393/120fe78b8717ff8ef622fa451ac2a6072b237a00/gistfile1", 854 | "size": 2525, 855 | "filename": "gistfile1" 856 | } 857 | }, 858 | "git_push_url": "git@gist.github.com:21393.git", 859 | "id": "21393", 860 | "comments": 0, 861 | "updated_at": "2009-10-14T15:33:23Z" 862 | } 863 | ] 864 | -------------------------------------------------------------------------------- /test/fixtures/gists_1: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx/1.0.13 3 | Date: Wed, 21 Mar 2012 12:26:26 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 5000 8 | ETag: "2feff610fcc111c636cc1035d3bd5c77" 9 | X-OAuth-Scopes: gist 10 | Link: ; rel="next", ; rel="last" 11 | X-RateLimit-Remaining: 4991 12 | Content-Length: 31544 13 | X-Accepted-OAuth-Scopes: gist 14 | 15 | [ 16 | { 17 | "url": "https://api.github.com/gists/2146374", 18 | "user": { 19 | "url": "https://api.github.com/users/swdyh", 20 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 21 | "login": "swdyh", 22 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 23 | "id": 9168 24 | }, 25 | "created_at": "2012-03-21T11:45:16Z", 26 | "public": true, 27 | "description": null, 28 | "html_url": "https://gist.github.com/2146374", 29 | "git_pull_url": "git://gist.github.com/2146374.git", 30 | "files": { 31 | "test.txt": { 32 | "type": "text/plain", 33 | "language": "Text", 34 | "raw_url": "https://gist.github.com/raw/2146374/b33c5606734ea563dac93e08bbaae96c811b05b8/test.txt", 35 | "size": 10, 36 | "filename": "test.txt" 37 | } 38 | }, 39 | "git_push_url": "git@gist.github.com:2146374.git", 40 | "id": "2146374", 41 | "comments": 0, 42 | "updated_at": "2012-03-21T11:45:16Z" 43 | }, 44 | { 45 | "url": "https://api.github.com/gists/2116130", 46 | "user": { 47 | "url": "https://api.github.com/users/swdyh", 48 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 49 | "login": "swdyh", 50 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 51 | "id": 9168 52 | }, 53 | "created_at": "2012-03-19T15:24:34Z", 54 | "public": true, 55 | "description": null, 56 | "html_url": "https://gist.github.com/2116130", 57 | "git_pull_url": "git://gist.github.com/2116130.git", 58 | "files": { 59 | "gisty-web.rb": { 60 | "type": "application/ruby", 61 | "language": "Ruby", 62 | "raw_url": "https://gist.github.com/raw/2116130/b37d5f7665d608d0ecd318434f8b6bcdeb8c10db/gisty-web.rb", 63 | "size": 1347, 64 | "filename": "gisty-web.rb" 65 | } 66 | }, 67 | "git_push_url": "git@gist.github.com:2116130.git", 68 | "id": "2116130", 69 | "comments": 0, 70 | "updated_at": "2012-03-19T15:24:34Z" 71 | }, 72 | { 73 | "url": "https://api.github.com/gists/2114461", 74 | "user": { 75 | "url": "https://api.github.com/users/swdyh", 76 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 77 | "login": "swdyh", 78 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 79 | "id": 9168 80 | }, 81 | "created_at": "2012-03-19T14:34:21Z", 82 | "public": true, 83 | "description": null, 84 | "html_url": "https://gist.github.com/2114461", 85 | "git_pull_url": "git://gist.github.com/2114461.git", 86 | "files": { 87 | "test.txt": { 88 | "type": "text/plain", 89 | "language": "Text", 90 | "raw_url": "https://gist.github.com/raw/2114461/b29dc95ae5962a394101b51cc5b739b562532e7c/test.txt", 91 | "size": 27, 92 | "filename": "test.txt" 93 | } 94 | }, 95 | "git_push_url": "git@gist.github.com:2114461.git", 96 | "id": "2114461", 97 | "comments": 0, 98 | "updated_at": "2012-03-19T14:34:21Z" 99 | }, 100 | { 101 | "url": "https://api.github.com/gists/1203094", 102 | "user": { 103 | "url": "https://api.github.com/users/swdyh", 104 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 105 | "login": "swdyh", 106 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 107 | "id": 9168 108 | }, 109 | "created_at": "2011-09-08T10:24:24Z", 110 | "public": true, 111 | "description": null, 112 | "html_url": "https://gist.github.com/1203094", 113 | "git_pull_url": "git://gist.github.com/1203094.git", 114 | "files": { 115 | "dict.m": { 116 | "type": "text/plain", 117 | "language": "Objective-C", 118 | "raw_url": "https://gist.github.com/raw/1203094/194d07af6285e9807c7d0d1a8ad2ee81ef110566/dict.m", 119 | "size": 486, 120 | "filename": "dict.m" 121 | }, 122 | "Makefile": { 123 | "type": "text/plain", 124 | "language": "Makefile", 125 | "raw_url": "https://gist.github.com/raw/1203094/16e002389b9dcca250e0c6661681dec25315593d/Makefile", 126 | "size": 89, 127 | "filename": "Makefile" 128 | } 129 | }, 130 | "git_push_url": "git@gist.github.com:1203094.git", 131 | "id": "1203094", 132 | "comments": 0, 133 | "updated_at": "2011-09-08T10:24:24Z" 134 | }, 135 | { 136 | "url": "https://api.github.com/gists/1144830", 137 | "user": { 138 | "url": "https://api.github.com/users/swdyh", 139 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 140 | "login": "swdyh", 141 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 142 | "id": 9168 143 | }, 144 | "created_at": "2011-08-14T12:03:08Z", 145 | "public": true, 146 | "description": null, 147 | "html_url": "https://gist.github.com/1144830", 148 | "git_pull_url": "git://gist.github.com/1144830.git", 149 | "files": { 150 | "refe.patch": { 151 | "type": "text/plain", 152 | "language": "Diff", 153 | "raw_url": "https://gist.github.com/raw/1144830/3ffd31aed62a92002dbcb5c247eeeedc8eef45a2/refe.patch", 154 | "size": 1498, 155 | "filename": "refe.patch" 156 | } 157 | }, 158 | "git_push_url": "git@gist.github.com:1144830.git", 159 | "id": "1144830", 160 | "comments": 0, 161 | "updated_at": "2011-08-14T12:03:08Z" 162 | }, 163 | { 164 | "url": "https://api.github.com/gists/1009134", 165 | "user": { 166 | "url": "https://api.github.com/users/swdyh", 167 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 168 | "login": "swdyh", 169 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 170 | "id": 9168 171 | }, 172 | "created_at": "2011-06-05T16:35:25Z", 173 | "public": true, 174 | "description": null, 175 | "html_url": "https://gist.github.com/1009134", 176 | "git_pull_url": "git://gist.github.com/1009134.git", 177 | "files": { 178 | "uniq.js": { 179 | "type": "application/javascript", 180 | "language": "JavaScript", 181 | "raw_url": "https://gist.github.com/raw/1009134/8f42e67ad7b8fb71c4d23c8d09002360db39309b/uniq.js", 182 | "size": 250, 183 | "filename": "uniq.js" 184 | } 185 | }, 186 | "git_push_url": "git@gist.github.com:1009134.git", 187 | "id": "1009134", 188 | "comments": 0, 189 | "updated_at": "2011-06-05T16:36:15Z" 190 | }, 191 | { 192 | "url": "https://api.github.com/gists/948199", 193 | "user": { 194 | "url": "https://api.github.com/users/swdyh", 195 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 196 | "login": "swdyh", 197 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 198 | "id": 9168 199 | }, 200 | "created_at": "2011-04-29T11:48:24Z", 201 | "public": true, 202 | "description": null, 203 | "html_url": "https://gist.github.com/948199", 204 | "git_pull_url": "git://gist.github.com/948199.git", 205 | "files": { 206 | "ggyast.rb": { 207 | "type": "application/ruby", 208 | "language": "Ruby", 209 | "raw_url": "https://gist.github.com/raw/948199/26d84f036b2de6694f6a1bca1701c80ccdcd616b/ggyast.rb", 210 | "size": 767, 211 | "filename": "ggyast.rb" 212 | } 213 | }, 214 | "git_push_url": "git@gist.github.com:948199.git", 215 | "id": "948199", 216 | "comments": 0, 217 | "updated_at": "2011-04-29T11:49:17Z" 218 | }, 219 | { 220 | "url": "https://api.github.com/gists/948170", 221 | "user": { 222 | "url": "https://api.github.com/users/swdyh", 223 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 224 | "login": "swdyh", 225 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 226 | "id": 9168 227 | }, 228 | "created_at": "2011-04-29T11:05:09Z", 229 | "public": true, 230 | "description": null, 231 | "html_url": "https://gist.github.com/948170", 232 | "git_pull_url": "git://gist.github.com/948170.git", 233 | "files": { 234 | "1304075100.jpg": { 235 | "type": "image/jpeg", 236 | "language": null, 237 | "raw_url": "https://gist.github.com/raw/948170/c443ff01aceef3ef18142a4be1c75f181e3d6aa2/1304075100.jpg", 238 | "size": 51620, 239 | "filename": "1304075100.jpg" 240 | } 241 | }, 242 | "git_push_url": "git@gist.github.com:948170.git", 243 | "id": "948170", 244 | "comments": 0, 245 | "updated_at": "2011-04-29T11:05:53Z" 246 | }, 247 | { 248 | "url": "https://api.github.com/gists/948164", 249 | "user": { 250 | "url": "https://api.github.com/users/swdyh", 251 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 252 | "login": "swdyh", 253 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 254 | "id": 9168 255 | }, 256 | "created_at": "2011-04-29T10:49:37Z", 257 | "public": true, 258 | "description": null, 259 | "html_url": "https://gist.github.com/948164", 260 | "git_pull_url": "git://gist.github.com/948164.git", 261 | "files": { 262 | "1304074164.jpg": { 263 | "type": "image/jpeg", 264 | "language": null, 265 | "raw_url": "https://gist.github.com/raw/948164/cfef9b2090247d616291c97b6d5ec83563da4d9d/1304074164.jpg", 266 | "size": 47075, 267 | "filename": "1304074164.jpg" 268 | } 269 | }, 270 | "git_push_url": "git@gist.github.com:948164.git", 271 | "id": "948164", 272 | "comments": 0, 273 | "updated_at": "2011-04-29T10:49:45Z" 274 | }, 275 | { 276 | "url": "https://api.github.com/gists/943874", 277 | "user": { 278 | "url": "https://api.github.com/users/swdyh", 279 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 280 | "login": "swdyh", 281 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 282 | "id": 9168 283 | }, 284 | "created_at": "2011-04-27T07:49:03Z", 285 | "public": true, 286 | "description": null, 287 | "html_url": "https://gist.github.com/943874", 288 | "git_pull_url": "git://gist.github.com/943874.git", 289 | "files": { 290 | "1303890528.jpg": { 291 | "type": "image/jpeg", 292 | "language": null, 293 | "raw_url": "https://gist.github.com/raw/943874/450cbc4b5edaa0c774ce128611f4f7f591df3fa5/1303890528.jpg", 294 | "size": 7808, 295 | "filename": "1303890528.jpg" 296 | } 297 | }, 298 | "git_push_url": "git@gist.github.com:943874.git", 299 | "id": "943874", 300 | "comments": 0, 301 | "updated_at": "2011-04-27T07:49:43Z" 302 | }, 303 | { 304 | "url": "https://api.github.com/gists/933702", 305 | "user": { 306 | "url": "https://api.github.com/users/swdyh", 307 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 308 | "login": "swdyh", 309 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 310 | "id": 9168 311 | }, 312 | "created_at": "2011-04-21T04:13:44Z", 313 | "public": true, 314 | "description": null, 315 | "html_url": "https://gist.github.com/933702", 316 | "git_pull_url": "git://gist.github.com/933702.git", 317 | "files": { 318 | "1303359219.jpg": { 319 | "type": "image/jpeg", 320 | "language": null, 321 | "raw_url": "https://gist.github.com/raw/933702/6ed8e9f7e2aefeb5f0bc60b42ab262afc28b2485/1303359219.jpg", 322 | "size": 7908, 323 | "filename": "1303359219.jpg" 324 | } 325 | }, 326 | "git_push_url": "git@gist.github.com:933702.git", 327 | "id": "933702", 328 | "comments": 0, 329 | "updated_at": "2011-04-21T04:14:11Z" 330 | }, 331 | { 332 | "url": "https://api.github.com/gists/933701", 333 | "user": { 334 | "url": "https://api.github.com/users/swdyh", 335 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 336 | "login": "swdyh", 337 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 338 | "id": 9168 339 | }, 340 | "created_at": "2011-04-21T04:12:48Z", 341 | "public": true, 342 | "description": null, 343 | "html_url": "https://gist.github.com/933701", 344 | "git_pull_url": "git://gist.github.com/933701.git", 345 | "files": { 346 | "1303359157.jpg": { 347 | "type": "image/jpeg", 348 | "language": null, 349 | "raw_url": "https://gist.github.com/raw/933701/76de596835476daf1ee2aa29a3b6a8d34af7c859/1303359157.jpg", 350 | "size": 8119, 351 | "filename": "1303359157.jpg" 352 | } 353 | }, 354 | "git_push_url": "git@gist.github.com:933701.git", 355 | "id": "933701", 356 | "comments": 0, 357 | "updated_at": "2011-04-21T04:13:05Z" 358 | }, 359 | { 360 | "url": "https://api.github.com/gists/933656", 361 | "user": { 362 | "url": "https://api.github.com/users/swdyh", 363 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 364 | "login": "swdyh", 365 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 366 | "id": 9168 367 | }, 368 | "created_at": "2011-04-21T03:28:57Z", 369 | "public": true, 370 | "description": null, 371 | "html_url": "https://gist.github.com/933656", 372 | "git_pull_url": "git://gist.github.com/933656.git", 373 | "files": { 374 | "gyast.rb": { 375 | "type": "application/ruby", 376 | "language": "Ruby", 377 | "raw_url": "https://gist.github.com/raw/933656/811cd112783158416c2f69988b7a81fab24a9af7/gyast.rb", 378 | "size": 511, 379 | "filename": "gyast.rb" 380 | } 381 | }, 382 | "git_push_url": "git@gist.github.com:933656.git", 383 | "id": "933656", 384 | "comments": 0, 385 | "updated_at": "2011-04-21T03:28:59Z" 386 | }, 387 | { 388 | "url": "https://api.github.com/gists/933645", 389 | "user": { 390 | "url": "https://api.github.com/users/swdyh", 391 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 392 | "login": "swdyh", 393 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 394 | "id": 9168 395 | }, 396 | "created_at": "2011-04-21T03:20:49Z", 397 | "public": true, 398 | "description": null, 399 | "html_url": "https://gist.github.com/933645", 400 | "git_pull_url": "git://gist.github.com/933645.git", 401 | "files": { 402 | "1303356040.jpg": { 403 | "type": "image/jpeg", 404 | "language": null, 405 | "raw_url": "https://gist.github.com/raw/933645/c6694c692fa5772c5ce2eca86cd3668847e93463/1303356040.jpg", 406 | "size": 12212, 407 | "filename": "1303356040.jpg" 408 | } 409 | }, 410 | "git_push_url": "git@gist.github.com:933645.git", 411 | "id": "933645", 412 | "comments": 0, 413 | "updated_at": "2011-04-21T03:20:55Z" 414 | }, 415 | { 416 | "url": "https://api.github.com/gists/899444", 417 | "user": { 418 | "url": "https://api.github.com/users/swdyh", 419 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 420 | "login": "swdyh", 421 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 422 | "id": 9168 423 | }, 424 | "created_at": "2011-04-02T12:07:01Z", 425 | "public": true, 426 | "description": null, 427 | "html_url": "https://gist.github.com/899444", 428 | "git_pull_url": "git://gist.github.com/899444.git", 429 | "files": { 430 | "ppj": { 431 | "type": "text/plain", 432 | "language": null, 433 | "raw_url": "https://gist.github.com/raw/899444/9171d183acabddb69e36c5125cb869c72159b45d/ppj", 434 | "size": 156, 435 | "filename": "ppj" 436 | } 437 | }, 438 | "git_push_url": "git@gist.github.com:899444.git", 439 | "id": "899444", 440 | "comments": 0, 441 | "updated_at": "2011-04-02T12:07:01Z" 442 | }, 443 | { 444 | "url": "https://api.github.com/gists/849044", 445 | "user": { 446 | "url": "https://api.github.com/users/swdyh", 447 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 448 | "login": "swdyh", 449 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 450 | "id": 9168 451 | }, 452 | "created_at": "2011-03-01T12:11:28Z", 453 | "public": true, 454 | "description": null, 455 | "html_url": "https://gist.github.com/849044", 456 | "git_pull_url": "git://gist.github.com/849044.git", 457 | "files": { 458 | "test.txt": { 459 | "type": "text/plain", 460 | "language": "Text", 461 | "raw_url": "https://gist.github.com/raw/849044/9daeafb9864cf43055ae93beb0afd6c7d144bfa4/test.txt", 462 | "size": 5, 463 | "filename": "test.txt" 464 | } 465 | }, 466 | "git_push_url": "git@gist.github.com:849044.git", 467 | "id": "849044", 468 | "comments": 0, 469 | "updated_at": "2011-03-01T12:11:28Z" 470 | }, 471 | { 472 | "url": "https://api.github.com/gists/849042", 473 | "user": { 474 | "url": "https://api.github.com/users/swdyh", 475 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 476 | "login": "swdyh", 477 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 478 | "id": 9168 479 | }, 480 | "created_at": "2011-03-01T12:10:26Z", 481 | "public": true, 482 | "description": null, 483 | "html_url": "https://gist.github.com/849042", 484 | "git_pull_url": "git://gist.github.com/849042.git", 485 | "files": { 486 | "test.txt": { 487 | "type": "text/plain", 488 | "language": "Text", 489 | "raw_url": "https://gist.github.com/raw/849042/9daeafb9864cf43055ae93beb0afd6c7d144bfa4/test.txt", 490 | "size": 5, 491 | "filename": "test.txt" 492 | } 493 | }, 494 | "git_push_url": "git@gist.github.com:849042.git", 495 | "id": "849042", 496 | "comments": 0, 497 | "updated_at": "2011-03-01T12:10:27Z" 498 | }, 499 | { 500 | "url": "https://api.github.com/gists/842127", 501 | "user": { 502 | "url": "https://api.github.com/users/swdyh", 503 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 504 | "login": "swdyh", 505 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 506 | "id": 9168 507 | }, 508 | "created_at": "2011-02-24T12:54:23Z", 509 | "public": true, 510 | "description": null, 511 | "html_url": "https://gist.github.com/842127", 512 | "git_pull_url": "git://gist.github.com/842127.git", 513 | "files": { 514 | "kt-cli": { 515 | "type": "text/plain", 516 | "language": null, 517 | "raw_url": "https://gist.github.com/raw/842127/dc6cc0f8ad22d46743aa4e074e39ff979b60ab23/kt-cli", 518 | "size": 1250, 519 | "filename": "kt-cli" 520 | } 521 | }, 522 | "git_push_url": "git@gist.github.com:842127.git", 523 | "id": "842127", 524 | "comments": 0, 525 | "updated_at": "2011-02-24T12:54:24Z" 526 | }, 527 | { 528 | "url": "https://api.github.com/gists/836299", 529 | "user": { 530 | "url": "https://api.github.com/users/swdyh", 531 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 532 | "login": "swdyh", 533 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 534 | "id": 9168 535 | }, 536 | "created_at": "2011-02-20T20:56:48Z", 537 | "public": true, 538 | "description": null, 539 | "html_url": "https://gist.github.com/836299", 540 | "git_pull_url": "git://gist.github.com/836299.git", 541 | "files": { 542 | "app.js": { 543 | "type": "application/javascript", 544 | "language": "JavaScript", 545 | "raw_url": "https://gist.github.com/raw/836299/9ee5aefdd9ec332cb68102993731c4e64db54f1a/app.js", 546 | "size": 2005, 547 | "filename": "app.js" 548 | }, 549 | "worker.js": { 550 | "type": "application/javascript", 551 | "language": "JavaScript", 552 | "raw_url": "https://gist.github.com/raw/836299/edb1b40f2f85f3d9d27b8873f06ed5087f92e94f/worker.js", 553 | "size": 816, 554 | "filename": "worker.js" 555 | }, 556 | "access.js": { 557 | "type": "application/javascript", 558 | "language": "JavaScript", 559 | "raw_url": "https://gist.github.com/raw/836299/73acc0976f36578de0b23ba79c8ad5afb2e5fef6/access.js", 560 | "size": 404, 561 | "filename": "access.js" 562 | } 563 | }, 564 | "git_push_url": "git@gist.github.com:836299.git", 565 | "id": "836299", 566 | "comments": 0, 567 | "updated_at": "2011-02-20T20:56:48Z" 568 | }, 569 | { 570 | "url": "https://api.github.com/gists/672914", 571 | "user": { 572 | "url": "https://api.github.com/users/swdyh", 573 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 574 | "login": "swdyh", 575 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 576 | "id": 9168 577 | }, 578 | "created_at": "2010-11-11T18:05:37Z", 579 | "public": true, 580 | "description": null, 581 | "html_url": "https://gist.github.com/672914", 582 | "git_pull_url": "git://gist.github.com/672914.git", 583 | "files": { 584 | "ust_rec.rb": { 585 | "type": "application/ruby", 586 | "language": "Ruby", 587 | "raw_url": "https://gist.github.com/raw/672914/8ef70df878ded3141899f6fd20b6c3598b6b5bc9/ust_rec.rb", 588 | "size": 1034, 589 | "filename": "ust_rec.rb" 590 | } 591 | }, 592 | "git_push_url": "git@gist.github.com:672914.git", 593 | "id": "672914", 594 | "comments": 0, 595 | "updated_at": "2010-11-11T18:05:37Z" 596 | }, 597 | { 598 | "url": "https://api.github.com/gists/639452", 599 | "user": { 600 | "url": "https://api.github.com/users/swdyh", 601 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 602 | "login": "swdyh", 603 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 604 | "id": 9168 605 | }, 606 | "created_at": "2010-10-21T22:02:09Z", 607 | "public": true, 608 | "description": null, 609 | "html_url": "https://gist.github.com/639452", 610 | "git_pull_url": "git://gist.github.com/639452.git", 611 | "files": { 612 | "extension.js": { 613 | "type": "application/javascript", 614 | "language": "JavaScript", 615 | "raw_url": "https://gist.github.com/raw/639452/b7fddc248dd18da578eae5bfbefb3ef7aa5d6b27/extension.js", 616 | "size": 1996, 617 | "filename": "extension.js" 618 | } 619 | }, 620 | "git_push_url": "git@gist.github.com:639452.git", 621 | "id": "639452", 622 | "comments": 0, 623 | "updated_at": "2010-10-21T22:02:09Z" 624 | }, 625 | { 626 | "url": "https://api.github.com/gists/635006", 627 | "user": { 628 | "url": "https://api.github.com/users/swdyh", 629 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 630 | "login": "swdyh", 631 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 632 | "id": 9168 633 | }, 634 | "created_at": "2010-10-19T20:14:52Z", 635 | "public": true, 636 | "description": null, 637 | "html_url": "https://gist.github.com/635006", 638 | "git_pull_url": "git://gist.github.com/635006.git", 639 | "files": { 640 | "twitter_embed_image.user.js": { 641 | "type": "application/javascript", 642 | "language": "JavaScript", 643 | "raw_url": "https://gist.github.com/raw/635006/a5e5f799532c5b4c413bca4ca31693cafa79e269/twitter_embed_image.user.js", 644 | "size": 1284, 645 | "filename": "twitter_embed_image.user.js" 646 | } 647 | }, 648 | "git_push_url": "git@gist.github.com:635006.git", 649 | "id": "635006", 650 | "comments": 0, 651 | "updated_at": "2010-10-19T20:14:52Z" 652 | }, 653 | { 654 | "url": "https://api.github.com/gists/576030", 655 | "user": { 656 | "url": "https://api.github.com/users/swdyh", 657 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 658 | "login": "swdyh", 659 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 660 | "id": 9168 661 | }, 662 | "created_at": "2010-09-12T12:13:27Z", 663 | "public": true, 664 | "description": null, 665 | "html_url": "https://gist.github.com/576030", 666 | "git_pull_url": "git://gist.github.com/576030.git", 667 | "files": { 668 | "hide_share.user.css": { 669 | "type": "text/css", 670 | "language": "CSS", 671 | "raw_url": "https://gist.github.com/raw/576030/ed470a61026b8221f1731678f5e31f39fa3a01dc/hide_share.user.css", 672 | "size": 141, 673 | "filename": "hide_share.user.css" 674 | } 675 | }, 676 | "git_push_url": "git@gist.github.com:576030.git", 677 | "id": "576030", 678 | "comments": 0, 679 | "updated_at": "2010-09-12T12:13:27Z" 680 | }, 681 | { 682 | "url": "https://api.github.com/gists/337627", 683 | "user": { 684 | "url": "https://api.github.com/users/swdyh", 685 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 686 | "login": "swdyh", 687 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 688 | "id": 9168 689 | }, 690 | "created_at": "2010-03-19T15:38:26Z", 691 | "public": true, 692 | "description": null, 693 | "html_url": "https://gist.github.com/337627", 694 | "git_pull_url": "git://gist.github.com/337627.git", 695 | "files": { 696 | "tweets_filter.user.js": { 697 | "type": "application/javascript", 698 | "language": "JavaScript", 699 | "raw_url": "https://gist.github.com/raw/337627/1a6e803aa6aa593ac592f557471b98dd60d22bba/tweets_filter.user.js", 700 | "size": 631, 701 | "filename": "tweets_filter.user.js" 702 | } 703 | }, 704 | "git_push_url": "git@gist.github.com:337627.git", 705 | "id": "337627", 706 | "comments": 0, 707 | "updated_at": "2010-03-19T15:38:26Z" 708 | }, 709 | { 710 | "url": "https://api.github.com/gists/316613", 711 | "user": { 712 | "url": "https://api.github.com/users/swdyh", 713 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 714 | "login": "swdyh", 715 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 716 | "id": 9168 717 | }, 718 | "created_at": "2010-02-27T10:08:53Z", 719 | "public": true, 720 | "description": null, 721 | "html_url": "https://gist.github.com/316613", 722 | "git_pull_url": "git://gist.github.com/316613.git", 723 | "files": { 724 | "open_uri_with_ssl.rb": { 725 | "type": "application/ruby", 726 | "language": "Ruby", 727 | "raw_url": "https://gist.github.com/raw/316613/2218acabd55fe041753215815a9dedc1ceb42201/open_uri_with_ssl.rb", 728 | "size": 500, 729 | "filename": "open_uri_with_ssl.rb" 730 | } 731 | }, 732 | "git_push_url": "git@gist.github.com:316613.git", 733 | "id": "316613", 734 | "comments": 0, 735 | "updated_at": "2010-02-27T10:08:54Z" 736 | }, 737 | { 738 | "url": "https://api.github.com/gists/2760736664d7c551c4c0", 739 | "user": { 740 | "url": "https://api.github.com/users/swdyh", 741 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 742 | "login": "swdyh", 743 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 744 | "id": 9168 745 | }, 746 | "created_at": "2009-12-08T10:33:38Z", 747 | "public": false, 748 | "description": null, 749 | "html_url": "https://gist.github.com/2760736664d7c551c4c0", 750 | "git_pull_url": "git://gist.github.com/2760736664d7c551c4c0.git", 751 | "files": { 752 | "private.txt": { 753 | "type": "text/plain", 754 | "language": "Text", 755 | "raw_url": "https://gist.github.com/raw/2760736664d7c551c4c0/257cc5642cb1a054f08cc83f2d943e56fd3ebe99/private.txt", 756 | "size": 4, 757 | "filename": "private.txt" 758 | } 759 | }, 760 | "git_push_url": "git@gist.github.com:2760736664d7c551c4c0.git", 761 | "id": "2760736664d7c551c4c0", 762 | "comments": 0, 763 | "updated_at": "2009-12-08T10:33:38Z" 764 | }, 765 | { 766 | "url": "https://api.github.com/gists/be9ff6cfee422dce7b4a", 767 | "user": { 768 | "url": "https://api.github.com/users/swdyh", 769 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 770 | "login": "swdyh", 771 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 772 | "id": 9168 773 | }, 774 | "created_at": "2009-12-08T10:29:17Z", 775 | "public": false, 776 | "description": null, 777 | "html_url": "https://gist.github.com/be9ff6cfee422dce7b4a", 778 | "git_pull_url": "git://gist.github.com/be9ff6cfee422dce7b4a.git", 779 | "files": { 780 | "gistfile1.txt": { 781 | "type": "text/plain", 782 | "language": "Text", 783 | "raw_url": "https://gist.github.com/raw/be9ff6cfee422dce7b4a/7c4a013e52c76442ab80ee5572399a30373600a2/gistfile1.txt", 784 | "size": 3, 785 | "filename": "gistfile1.txt" 786 | } 787 | }, 788 | "git_push_url": "git@gist.github.com:be9ff6cfee422dce7b4a.git", 789 | "id": "be9ff6cfee422dce7b4a", 790 | "comments": 0, 791 | "updated_at": "2009-12-08T10:29:17Z" 792 | }, 793 | { 794 | "url": "https://api.github.com/gists/a4907f927192fd8933e7", 795 | "user": { 796 | "url": "https://api.github.com/users/swdyh", 797 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 798 | "login": "swdyh", 799 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 800 | "id": 9168 801 | }, 802 | "created_at": "2009-12-08T10:26:07Z", 803 | "public": false, 804 | "description": null, 805 | "html_url": "https://gist.github.com/a4907f927192fd8933e7", 806 | "git_pull_url": "git://gist.github.com/a4907f927192fd8933e7.git", 807 | "files": { 808 | "private.txt": { 809 | "type": "text/plain", 810 | "language": "Text", 811 | "raw_url": "https://gist.github.com/raw/a4907f927192fd8933e7/257cc5642cb1a054f08cc83f2d943e56fd3ebe99/private.txt", 812 | "size": 4, 813 | "filename": "private.txt" 814 | } 815 | }, 816 | "git_push_url": "git@gist.github.com:a4907f927192fd8933e7.git", 817 | "id": "a4907f927192fd8933e7", 818 | "comments": 0, 819 | "updated_at": "2009-12-08T10:26:08Z" 820 | }, 821 | { 822 | "url": "https://api.github.com/gists/246500", 823 | "user": { 824 | "url": "https://api.github.com/users/swdyh", 825 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 826 | "login": "swdyh", 827 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 828 | "id": 9168 829 | }, 830 | "created_at": "2009-12-01T18:12:21Z", 831 | "public": true, 832 | "description": null, 833 | "html_url": "https://gist.github.com/246500", 834 | "git_pull_url": "git://gist.github.com/246500.git", 835 | "files": { 836 | "bccks_remove_bg_image.css": { 837 | "type": "text/css", 838 | "language": "CSS", 839 | "raw_url": "https://gist.github.com/raw/246500/be32ebaffba8be894f6b154c730568d873bebe3c/bccks_remove_bg_image.css", 840 | "size": 130, 841 | "filename": "bccks_remove_bg_image.css" 842 | } 843 | }, 844 | "git_push_url": "git@gist.github.com:246500.git", 845 | "id": "246500", 846 | "comments": 0, 847 | "updated_at": "2009-12-01T18:12:25Z" 848 | }, 849 | { 850 | "url": "https://api.github.com/gists/221465", 851 | "user": { 852 | "url": "https://api.github.com/users/swdyh", 853 | "gravatar_id": "465e43442fc3604b4a7ad9c55bc52066", 854 | "login": "swdyh", 855 | "avatar_url": "https://secure.gravatar.com/avatar/465e43442fc3604b4a7ad9c55bc52066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", 856 | "id": 9168 857 | }, 858 | "created_at": "2009-10-29T14:06:06Z", 859 | "public": true, 860 | "description": null, 861 | "html_url": "https://gist.github.com/221465", 862 | "git_pull_url": "git://gist.github.com/221465.git", 863 | "files": { 864 | "pay.txt": { 865 | "type": "text/plain", 866 | "language": "Text", 867 | "raw_url": "https://gist.github.com/raw/221465/8ed290c1d9bd1239b6777aa01431e9ebee1fc15f/pay.txt", 868 | "size": 400, 869 | "filename": "pay.txt" 870 | } 871 | }, 872 | "git_push_url": "git@gist.github.com:221465.git", 873 | "id": "221465", 874 | "comments": 0, 875 | "updated_at": "2009-10-29T14:06:06Z" 876 | } 877 | ] 878 | --------------------------------------------------------------------------------