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 | |
# coding=utf-8 | |
__author__ = 'jszhou' | |
from bottle import * | |
import hashlib | |
import xml.etree.ElementTree as ET | |
import urllib2 | |
# import requests | |
import json |
;; Installation: | |
;; In .emacs add: | |
;; (require 'doubanfm) | |
(dolist (path-list (list "./lib/" | |
"./lib/http-emacs" | |
"./lib/emms-3.0")) | |
(add-to-list 'load-path | |
(expand-file-name path-list (file-name-directory load-file-name)))) |
#!/usr/bin/env python | |
import subprocess | |
import urlparse | |
import urllib2 | |
from urllib import urlencode | |
import socket | |
import Queue | |
import threading | |
import getopt |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/usr/bin/env bash | |
sync_dryrun() | |
{ | |
echo | |
echo -e "\033[1m ...dryrun...\033[0m" | |
rsync -av --delete ~/happycasts/episodes/ peter@linode:~/media/assets/episodes/ --dry-run | |
echo -e "\033[1m ...dryrun...\033[0m" | |
echo | |
} |
ips=$(nmap -sP 192.168.1.0/24 2>/dev/null | grep 'scan report' | awk '{print $NF}' |sed 's/(//;s/)//') | |
for ip in $ips | |
do | |
mac=$(arp $ip | cut -f 4 -d' ') | |
ptr=$(dig -x $ip| grep PTR |tail -n 1|awk '{ print $NF}') | |
if [ $ptr == 'PTR' ] | |
then | |
ptr="none" | |
fi |
def runserver(port=5000, profile_log=None): | |
"""Runs a development server.""" | |
from gevent.wsgi import WSGIServer | |
from werkzeug.serving import run_with_reloader | |
from werkzeug.debug import DebuggedApplication | |
from werkzeug.contrib.profiler import ProfilerMiddleware | |
port = int(port) | |
if profile_log: |