James Sugrue [asked][1], "@GitHubAPI is there a way to find the number of stars for a given repository?"
$ curl -ni "https://api.github.com/search/repositories?q=more+useful+keyboard" -H 'Accept: application/vnd.github.preview'
{| from fabric.api import * | |
| env.hosts = ['host.name.com'] | |
| env.user = 'user' | |
| env.key_filename = '/path/to/keyfile.pem' | |
| def local_uname(): | |
| local('uname -a') | |
| def remote_uname(): |
| A warning occurred (42 apples) | |
| An error occurred |
| from sqlalchemy import create_engine | |
| engine = create_engine('sqlite:///:memory:', echo=True) | |
| from sqlalchemy.ext.declarative import declarative_base | |
| Base = declarative_base() | |
| from sqlalchemy import Column, Integer, String, Float | |
| class User(Base): | |
| __tablename__ = 'users' |
| user www-data; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
| #models.py | |
| class Task(models.Model): | |
| title = models.CharField(max_length=255) | |
| description = models.TextField() | |
| def __unicode__(self): | |
| return self.title |
| """Project a map of Middle-earth on modern Europe. | |
| Builds an `overlay.kmz` file in the current directory which should be | |
| opened with Google Earth. | |
| """ | |
| import os | |
| import urllib2 | |
| import zipfile | |
| from math import cos, radians |
| # vim: set fileencoding=utf8 | |
| # http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html | |
| # http://aws.typepad.com/aws/2014/01/amazon-sqs-new-dead-letter-queue.html | |
| import json | |
| import boto | |
| from pprint import pprint | |
| conn = boto.connect_sqs() | |
| q1 = conn.create_queue('test_q1') |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |