An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| import urllib2 | |
| import httplib | |
| import os | |
| import time | |
| from urllib2 import Request, urlopen, URLError | |
| def save_file(file): | |
| output_filename = file.split("/")[-1] | |
| if os.path.exists(output_filename): |
| <?xml version="1.0" encoding="UTF-8"?><Response><Say>Welcome to twilio!</Say></Response> |
| Your YC username: | |
| Company name: | |
| Company url, if any: | |
| Phone number(s): | |
| Please enter the url of a 1 minute unlisted (not private) YouTube video introducing the founders. (Instructions.) | |
| YC usernames of all founders, including you, e1ven, separated by spaces. (That's usernames, not given names: "bksmith," not "Bob Smith." If there are 3 founders, there should be 3 tokens in this answer.) | |
| YC usernames of all founders, including you, e1ven, who will live in the Bay Area January through March if we fund you. (Again, that's usernames, not given names.) | |
| What is your company going to make? | |
| If this application is a response to a YC RFS, which one? | |
| For each founder, please list: YC username; name; age; year of graduation, school, degree and subject for each degree; email address; personal url, github url, facebook id, twitter id; employer and title (if any) at last job before this startup. Put unfinished degrees in parens. List the main contact first. Separate founders with blank lines. Put an asterisk before t |
| //ImageView angryHuskyImageView = (ImageView)findViewById(R.id.imageView); | |
| //angryHuskyImageView.setTag("http://d24w6bsrhbeh9d.cloudfront.net/photo/a2zQDvw_700b.jpg"); |
| function shift(input, pos) { | |
| return input.slice(pos, input.length) + input.slice(0, pos); | |
| } | |
| console.log(shift("abcdefg", 2) === "cdefgab"); |
| git clone [email protected]:boot2docker/boot2docker.git | |
| chmod +x boot2docker | |
| sudo mv boot2docker /usr/local/bin/boot2docker | |
| # see https://github.com/boot2docker/boot2docker/blob/master/doc/BUILD.md | |
| build ubuntu image | |
| cd boot2docker | |
| # (references to https://github.com/boot2docker/boot2docker/blob/master/base/Dockerfile) | |
| # note this step takes quite a while |
| How to call dockerfile? | |
| Github: | |
| docker build github_url | |
| Locally: | |
| docker build . | |
| docker build <path> | |
| Trusted builds: |
| - Create a new bot user and invite to the room on hipchat | |
| - Once the bot account is created, go to https://smarttech.hipchat.com/account/xmpp | |
| - Install coffee script and hubot | |
| ``` | |
| npm install --global coffee-script hubot | |
| ``` | |
| - Create a new hubot project, cd into the folder and install depenedncies | |
| ``` | |
| hubot --create hubot-fun | |
| cd hubot-fun |
| #!/bin/bash | |
| # ======================================== | |
| # Testing completion suggest in ElasticSearch | |
| # ======================================== | |
| curl -X DELETE localhost:9200/hotels | |
| curl -X PUT localhost:9200/hotels -d ' | |
| { | |
| "mappings": { | |
| "hotel" : { |