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 subprocess | |
| import json | |
| import os, errno | |
| import argparse | |
| def mkdir_p(path): | |
| try: | |
| os.makedirs(path) | |
| except OSError as exc: | |
| if exc.errno == errno.EEXIST and os.path.isdir(path): |
| import boto | |
| import json | |
| from boto.sqs.message import Message | |
| sqs = boto.connect_sqs() | |
| queue = sqs.get_queue('queue') | |
| mess = { | |
| "test":"hello world" | |
| } |
| import subprocess | |
| import json | |
| import os, errno | |
| import argparse | |
| def mkdir_p(path): | |
| try: | |
| os.makedirs(path) | |
| except OSError as exc: | |
| if exc.errno == errno.EEXIST and os.path.isdir(path): |
| /*jshint globalstrict:true */ | |
| /*global angular:true */ | |
| 'use strict'; | |
| angular.module('demo', [ | |
| 'demo.controllers', | |
| 'demo.directives', | |
| 'elasticjs.service' | |
| ]); |
| This is an example how to perform multi-select faceting in ElasticSearch. | |
| Selecting multiple values from the same facet will result in an OR filter between each of the values: | |
| (facet1.value1 OR facet1.value2) | |
| Faceting on more than one facet will result in an AND filter between each facet: | |
| (facet1.value1 OR facet1.value2) AND (facet2.value1) | |
| I have chosen to update the counts for each facet the selected value DOES NOT belong to since we are performing an AND between each facet. I have included an example that shows how to keep the counts if you don't want to do this (filter0.sh). |
| #!/bin/bash | |
| # ======================================== | |
| # Testing completion suggest in ElasticSearch | |
| # ======================================== | |
| curl -X DELETE localhost:9200/hotels | |
| curl -X PUT localhost:9200/hotels -d ' | |
| { | |
| "mappings": { | |
| "hotel" : { |
| - 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 |
| How to call dockerfile? | |
| Github: | |
| docker build github_url | |
| Locally: | |
| docker build . | |
| docker build <path> | |
| Trusted builds: |
| git clone git@github.com: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 |