This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --head -H "If-Modified-Since: Tue, 29 Nov 2016 23:38:37 GMT" https://api.github.com/users/jharmn | |
HTTP/1.1 304 Not Modified | |
Server: GitHub.com | |
Date: Thu, 01 Dec 2016 21:43:49 GMT | |
Status: 304 Not Modified | |
X-RateLimit-Limit: 60 | |
X-RateLimit-Remaining: 52 | |
X-RateLimit-Reset: 1480631186 | |
Cache-Control: public, max-age=60, s-maxage=60 | |
Vary: Accept |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --head https://api.github.com/users/jharmn | |
HTTP/1.1 200 OK | |
Server: GitHub.com | |
Date: Thu, 01 Dec 2016 21:41:44 GMT | |
Content-Type: application/json; charset=utf-8 | |
Content-Length: 1386 | |
Status: 200 OK | |
X-RateLimit-Limit: 60 | |
X-RateLimit-Remaining: 52 | |
X-RateLimit-Reset: 1480631186 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"login": "jharmn", | |
"id": 1305160, | |
"avatar_url": "https://avatars.githubusercontent.com/u/1305160?v=3", | |
"gravatar_id": "", | |
"url": "https://api.github.com/users/jharmn", | |
"html_url": "https://github.com/jharmn", | |
"followers_url": "https://api.github.com/users/jharmn/followers", | |
"following_url": "https://api.github.com/users/jharmn/following{/other_user}", | |
"gists_url": "https://api.github.com/users/jharmn/gists{/gist_id}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jsonschema import validate | |
from json import load | |
instance = load(open('data.json', 'r+')) | |
schema = load(open('schema.json', 'r+')) | |
print(validate(instance, schema)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import check_output, CalledProcessError, STDOUT | |
from os import walk | |
for dir in walk('.').next()[1]: | |
try: | |
result = check_output('/usr/bin/git rev-parse --is-inside-work-tree', shell=True, stderr=STDOUT, cwd=dir) | |
except CalledProcessError: | |
print dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APIs make us all superheroes! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HEAD http://api.twitter.com/1/users/show.json?screen_name=jasonh_n_portland |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HEAD http://api.twitter.com/1/users/show.json?screen_name=jasonh_n_austin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET http://api.twitter.com/1/users/show.json?screen_name=jasonh_n_austin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --head -i https://api.github.com/users/jasonh-n-austin -H "If-Modified-Since: Tue, 12 Feb 2013 02:58:46 GMT" | |
HTTP/1.1 304 Not Modified | |
Server: GitHub.com | |
Date: Thu, 14 Feb 2013 04:52:32 GMT | |
Connection: keep-alive | |
Status: 304 Not Modified | |
X-RateLimit-Limit: 60 | |
X-RateLimit-Remaining: 50 | |
Vary: Accept | |
Cache-Control: public, max-age=60, s-maxage=60 |
NewerOlder