Skip to content

Instantly share code, notes, and snippets.

---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Small bag / wearing

  • Passport (+I-797B)
  • Hoodie
  • Bluetooth headphones
  • Surface
  • 3DS/Vita (+games for 3DS)
  • Nexus 9
  • Kindle
@yashh
yashh / lync_bot.py
Created July 26, 2014 23:53
Python lync API bot
import base64, copy, sys
import requests
import json
from urlparse import urlparse
sip_domain = "company.com"
username = "firstname.lastname@company.com"
password = "somepassword"
def extractAuthURL(str):
@yashh
yashh / rtm.py
Created February 12, 2012 00:03
remember the milk cmd line
#!/usr/bin/python
"""Command line rtm interface
requirements: sudo pip install simplejson texttable
"""
import os, sys, urllib, urllib2, json, ConfigParser, datetime
from hashlib import md5
from texttable import Texttable
FILE_PATH = "~/.rtm"
SECTION = "rtm_data"
@yashh
yashh / Preferences.sublime-settings
Last active June 4, 2019 06:09
bash_profile and aliases
{
"folder_exclude_patterns":
[
"node_modules",
".cache"
],
"font-face": "Helvetica-Neue",
"font_size": 14,
"ignored_packages":
[
@yashh
yashh / todo.py
Created December 31, 2011 18:12
a simple command line todo which reads and write to a text file
#!/usr/bin/python
"""A simple command line todo for simplenoteapp synced via dropbox."""
import os, sys, datetime
class TaskList(object):
def __init__(self, todo, done):
self.todo = todo
self.done = done
@yashh
yashh / blobstore.py
Created September 24, 2011 03:27
A blobstore to store huge data objects in S3
import simplejson
from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.exception import S3ResponseError
AWS_ACCESS_KEY_ID = "xxx"
AWS_SECRET_ACCESS_KEY = "xxxxx"
class BlobStore(object):
def __init__(self, bucket_name):
s3_conn = S3Connection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
@yashh
yashh / gist:1081962
Created July 14, 2011 04:54
pymysql load test
# stolen from tarek ziade's bug report
# https://bug667846.bugzilla.mozilla.org/attachment.cgi?id=542440
import pymysql
import time
import threading
from wsgiref.simple_server import make_server
# set up the greenlet
#from gevent import monkey
#monkey.patch_socket()