Skip to content

Instantly share code, notes, and snippets.

View shawjia's full-sized avatar
🎯
Focusing

shawjia

🎯
Focusing
  • Shenzhen, China
View GitHub Profile
@venj
venj / remux.rb
Created May 20, 2012 06:56
The real deal remux script that can remux videos with M4V compatible video stream. Audio stream will be encoded to 192kbps aac if it is not m4v compatible audio.
#!/usr/bin/env ruby
# Remux MP4/H264 videos (mkv, avi, etc.) to m4v.
TMPFILE = "/tmp/ffprobe_out.txt"
VIDEO_CONTAINER = ["mkv", "f4v", "avi", "divx", "ts"]
VCODECS = ["mpeg4", "h264"]
ACODECS = ["aac"]
if (`which ffmpeg` == "")
puts "You need ffmpeg to use this command."
@jrburke
jrburke / build.js
Created December 22, 2011 05:58
Doing multiple almond builds with a nodejs script, example
//Download jquery.js and place it in the build, do not use require-jquery.js
//in the build, since each of the build layers just needs almond and not the
//full require.js file.
//This file is run in nodejs to do the build: node build.js
//Load the requirejs optimizer
var requirejs = require('./r.js');
//Set up basic config, include config that is
//common to all the requirejs.optimize() calls.
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@zhasm
zhasm / fanfou.py
Created February 24, 2011 04:13
fanfou sdk draft in python, basic auth.
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#author: rex
#blog: http://iregex.org
#filename test.py
#created: 2010-12-18 22:42
import re
import pycurl
import json
@zliuva
zliuva / fanfou.js
Created December 24, 2010 06:17
A node.js command line client for Fanfou.com
#!/usr/bin/env node
/**
* fanfou.js
* A node.js Fanfou client
* © 2010 softboysxp.com
*/
/**
* Copyright 2010 softboysxp.com. All rights reserved.