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:
| Liquid Snobs (DIY Drinker) | |
| - Categories (post type): | |
| 1. Coffee | |
| 2. Beer | |
| 3. Cocktails | |
| ** might could add tea or something else | |
| - Each part has it's own slightly different css/look and feel |
| from django import template | |
| register = template.Library() | |
| MOMENT = 120 # duration in seconds within which the time difference | |
| # will be rendered as 'a moment ago' | |
| @register.filter | |
| def naturalTimeDifference(value): | |
| """ |
| DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
| STATICFILES_STORAGE = 'path.to.storage.S3StaticStorage' | |
| THUMBNAIL_DEFAULT_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
| AWS_ACCESS_KEY_ID = 'YOUR KEY' | |
| AWS_SECRET_ACCESS_KEY = 'YOUR KEY' | |
| AWS_STORAGE_BUCKET_NAME = 'media.YOURSITE.com' | |
| AWS_STATIC_BUCKET_NAME = 'static.YOURSITE.com' | |
| AWS_S3_CUSTOM_DOMAIN = AWS_STORAGE_BUCKET_NAME | |
| AWS_STATIC_CUSTOM_DOMAIN = AWS_STATIC_BUCKET_NAME | |
| STATIC_URL = 'http://%s/' % AWS_STATIC_BUCKET_NAME |
| description "Celery for ReadTheDocs" | |
| start on runlevel [2345] | |
| stop on runlevel [!2345] | |
| #Send KILL after 20 seconds | |
| kill timeout 20 | |
| script | |
| chdir /home/ubuntu/playground/tw | |
| exec bin/python manage.py celeryd -B -c 4 -f /home/ubuntu/log/celery.log | |
| end script |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| import uuid | |
| alphabet = ( | |
| '!"#$%&\'()*+,-./0123456789:;<=>?@' | |
| 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| '[\\]^_`' | |
| 'abcdefghijklmnopqrstuvwxyz{|}~' | |
| ) |
| import requests | |
| class HoverException(Exception): | |
| pass | |
| class HoverAPI(object): | |
| def __init__(self, username, password): | |
| params = {"username": username, "password": password} | |
| r = requests.post("https://www.hover.com/api/login", params=params) |
How to have some fun using the terminal.
sudo apt-get install cowsaysudo apt-get install fortunesudo apt-get install figletruby -vgem install lolcat| function YNABAccounts(accessToken, budgetId) { | |
| const accounts = _getBudgetAccounts(accessToken, budgetId); | |
| if(accounts == null) { | |
| return null; | |
| } | |
| const columns = ["Name", "Type", "Budget", "Closed", "Balance"]; | |
| const rows = accounts.map(function (acc) { | |
| return [ |