BEWARE SPOILERS
This is for people re-watching the series.
Drink when:
var url = "https://yoursitename.desk.com/api/v2/cases"; | |
var options = { | |
"method": "post", | |
"headers": { | |
"Authorization": "Basic " + Utilities.base64Encode("[email protected]:yourpassword") | |
}, | |
"payload": { | |
"type": "email", | |
"subject": "Email Case Subject", | |
"priority": 4, |
#!/bin/bash | |
export FOO=100 | |
python - <<END | |
import os | |
print "foo:", os.environ['FOO'] | |
END |
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# == Synopsis | |
# Proof of concept using Fuzzy File Finder to locate a script to edit | |
# Searches a set of predefined locations for a fuzzy string | |
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease" | |
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease" | |
# | |
# Results are ranked and a menu is displayed with the most likely | |
# match at the top. Editor to be launched and directories to search |
from django.db import models | |
class ChainableManager(models.Manager): | |
""" | |
A manager that allows chaining of all methods defined on it. | |
Example: | |
class MyManager(ChainableManager): | |
def active(self): |
class SmartSlice(object): | |
""" | |
A slice object which represents the mapping between old and new indices. | |
Given a slice object, you can determine whether a given index will be | |
present in the sub-list that slice represents. For example: | |
>>> 3 in SmartSlice(2, 5) | |
True |
# -*- coding: utf-8 -*- | |
import os | |
from flask import Flask | |
from flask_heroku import Heroku | |
from flask_sslify import SSLify | |
from raven.contrib.flask import Sentry | |
from flask.ext.celery import Celery |
github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers
in your home directory create a file called '.netrc', for example
/Users/ahoward/.netrc
in it put these contents
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"