This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#!/usr/bin/env python | |
import optparse | |
import sys | |
from boto.s3.connection import S3Connection | |
def sign(bucket, path, access_key, secret_key, https, expiry): | |
c = S3Connection(access_key, secret_key) | |
return c.generate_url( | |
expires_in=long(expiry), |
import sys | |
from IPython.core.debugger import Pdb | |
from IPython.core import ipapi | |
def set_trace(): | |
ip = ipapi.get() | |
def_colors = ip.colors | |
Pdb(def_colors).set_trace(sys._getframe().f_back) |
/* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101 | |
* 2017-12-05 | |
* | |
* -- T. | |
*/ | |
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
#include <stdlib.h> | |
#include <stdio.h> |
class JsonSerializableMixin(object): | |
def __json__(self, request): | |
""" | |
Converts all the properties of the object into a dict for use in json. | |
You can define the following in your class | |
_json_eager_load : | |
list of which child classes need to be eagerly loaded. This applies | |
to one-to-many relationships defined in SQLAlchemy classes. |
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/ | |
(function () { | |
'use strict'; | |
var exports = {}; | |
exports.uuid4 = function () { | |
//// return uuid of form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx | |
var uuid = '', ii; | |
for (ii = 0; ii < 32; ii += 1) { |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
#!/usr/bin/env python | |
from collections import defaultdict | |
def calc_probabilities(s="the cat in the hat"): | |
"""Calculate the probabilities (read: frequencies) of letters in | |
string `s`. | |
""" |
#!/bin/bash | |
# You can run this to make fetch automatically prune any time you pull or | |
# fetch. | |
# | |
# git config remote.origin.prune true | |
git fetch --prune | |
# Abort early if there are local changes | |
git checkout master || exit |
- e675f89...a7822d3 master -> master (forced update)
Create a local branch where master belongs.
git checkout -b fixmaster e675f89
a. If someone pushed to master between the last time you pulled and now you'll need to go to github to get the full hash. Go to https://github.com/<owner>/<repo>/commit/e675f89
and it'll have the full hash on the page.
`git fetch origin <full hash of e675f89>`
git checkout -b fixmaster e675f89