View base16-nova.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# base16-shell (https://github.com/chriskempson/base16-shell) | |
# Base16 Shell template by Chris Kempson (http://chriskempson.com) | |
# Nova scheme by Trevor Miller (https://trevordmiller.com) | |
# This script doesn't support linux console (use 'vconsole' template instead) | |
if [ "${TERM%%-*}" = 'linux' ]; then | |
return 2>/dev/null || exit 0 | |
fi |
View gist:7cd5c8e9e502a714ac8e0ce8340df87e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am pengwynn on github. | |
* I am pengwynn (https://keybase.io/pengwynn) on keybase. | |
* I have a public key whose fingerprint is 0C04 D57E 795D BB21 3074 DAC4 9E6E 1D1C 5B76 C15E | |
To claim this, I am signing this object: |
View pretty_json.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pretty = user_agent.cli? || user_agent.browser? | |
extra_newline = pretty ? "\n" : "" | |
body = custom_content_type ? obj : encode_json(obj, :pretty => pretty) + extra_newline |
View list_count.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
Octokit.pulls("rails/rails", :state => "all", :per_page => 1) | |
last_page = Octokit.last_response.rels[:last].href | |
count = Addressable::URI.parse(last_page).query_values["page"] |
View strings.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message = "Hello there, wayfaring stranger. If you're reading this then " \ | |
"you probably didn't see our blog post a couple of years " \ | |
"back announcing that this API would go away: http://git.io/17AROg " \ | |
"Fear not, you should be able to get what you need from the shiny new " \ | |
"Events API instead." |
View backslash.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hash.update \ | |
:name => profile.name, | |
:company => profile.company, | |
:blog => profile.blog, | |
:location => profile.location, | |
:email => profile.email, | |
:hireable => profile.hireable, | |
... |
View commit_stats.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
stats = Octokit.commit('octokit/octokit.rb', '6e0d6ccd5b68173dd030e62f4276793e5d7ce40b').stats | |
stats.additions | |
=> 7 | |
stats.deletions | |
=> 78 |
View releases.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ curl -n -I -H"Accept: application/vnd.github.manifold-preview" https://api.github.com/repos/octokit/octokit.rb/releases | |
HTTP/1.1 200 OK | |
Server: GitHub.com | |
Date: Thu, 03 Oct 2013 19:11:09 GMT | |
Content-Type: application/json; charset=utf-8 | |
Status: 200 OK | |
X-RateLimit-Limit: 5000 | |
X-RateLimit-Remaining: 4998 | |
X-RateLimit-Reset: 1380831057 | |
Cache-Control: private, max-age=60, s-maxage=60 |
View 1.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -i https://api.github.com/users/pengwynn/starred\?per_page\=1 | |
HTTP/1.1 200 OK | |
Server: GitHub.com | |
Date: Wed, 28 Aug 2013 13:52:09 GMT | |
Content-Type: application/json; charset=utf-8 | |
Status: 200 OK | |
X-RateLimit-Limit: 60 | |
X-RateLimit-Remaining: 53 | |
X-RateLimit-Reset: 1377700904 | |
Cache-Control: public, max-age=60, s-maxage=60 |
View git-contributors.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/twitter/bootstrap | |
... | |
$ cd bootstrap | |
$ git --no-pager shortlog -s -n | |
2153 Mark Otto | |
781 Jacob Thornton | |
65 fat | |
30 Pete Hopkins |
NewerOlder