Skip to content

Instantly share code, notes, and snippets.

View Leask's full-sized avatar
🏠
Working from home

Sixia "Leask" Huang Leask

🏠
Working from home
View GitHub Profile
@yarshure
yarshure / subtitle_wwdc15
Created June 26, 2015 15:23
wwdc15 videos subtitle
curl -O http://devstreaming.apple.com/videos/wwdc/2015/216isrjt4ku9w4/216/subtitles/eng/216_sd_layout_and_animation_techniques_for_watchkit.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/304ywrr62d/304/subtitles/eng/304_sd_itunes_connect_development_to_distribution.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/103ot7lzkdri2fvn1iyh/103/subtitles/eng/103_sd_apple_design_awards.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/105ncyldc6ofunvsgtan/105/subtitles/eng/105_sd_introducing_watchkit_for_watchos_2.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/201pps6n6g0nsnz/201/subtitles/eng/201_sd_ios_accessibility.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/1086gvs7f4vryixs49s6/108/subtitles/eng/108_sd_building_watch_apps.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/301tcfp66f/301/subtitles/eng/301_sd_whats_new_in_managing_apple_devices.vtt
curl -O http://devstreaming.apple.com/videos/wwdc/2015/6053hq2fz0ebo0lm/605/subtitles/eng/605_sd_going_
@forresty
forresty / download_all_tasks.rb
Created October 11, 2011 03:25
A browser script to automatically parse all lixian.vip.xunlei.com file names and URLs
#!/usr/bin/env ruby
require "yaml"
# make sure you have dump cookies to xunlei-cookies.txt
YAML.load_file("all_files.yml").each do |file|
cmd = "wget --load-cookies=xunlei-cookies.txt '#{file[:url]}' -c -O '#{file[:name]}'"
system(cmd)
end
@collinschaafsma
collinschaafsma / gist:2308101
Created April 5, 2012 04:59
FFMPEG Setup
# Add speex, for Red5
brew edit ffmpeg
args << "--enable-libspeex" if Formula.factory('speex').installed?
brew install --use-gcc ffmpeg
# H.264 / ACC
ffmpeg -i video.flv -acodec libfaac -ab 19k -ar 16000 -vsync 1 -async 1 -r 25.0 -b 193k -vcodec libx264 -s 420x340 video.mp4
# VP8 / Vorbis
@fundon
fundon / formatjson.sh
Created April 9, 2012 15:55
use JSON.stringify to pretty-print JSON.
function formatjson() {
local json=""
if [ -p /dev/stdin ]; then
# piping, e.g. `echo '{"foo":42}' | formatjson`
while read -r line; do
json="$json$line"
done
else
# e.g. `formatjson '{"foo":42}'`
json="$*"
@fundon
fundon / some.sh
Created December 10, 2012 17:05 — forked from tj/some.sh
change terminal tab name on cd
function tabname {
printf "\e]1;$1\a"
}
cd() {
test $# -ne 0 && builtin cd "$*" || builtin cd
tabname $(basename $(pwd))
}
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdlib.h>
int main(int argv, char *argc[])
@fundon
fundon / date.sh
Created March 28, 2013 10:01
date command ISO8601
> date +'%Y-%m-%dT%H:%M:%S UTC%z'
# 2013-03-28T17:57:10 UTC+0800
anonymous
anonymous / Mario-in-pure-CSS.markdown
Created September 27, 2013 07:05
A Pen by KingSavate.

Mario in pure CSS

Just a Mario done in pure CSS with box-shadow. It is done pixel by pixel, with a declaration of box-shadow for each pixeL; It has to be improved by doing areas of pixels with the spread parameter of box-shadow

A Pen by KingSavate on CodePen.

License.

anonymous
anonymous / An-Anonymous-Pen.markdown
Created October 30, 2013 07:57
A Pen by Secret Sam.
@forresty
forresty / video-list.txt
Created October 16, 2011 14:35
Stanford ML Class Video Links
http://s3.amazonaws.com/stanford_videos/cs229/videos/01.1-Introduction-Welcome.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/01.b-Introduction-WhatIsMachineLearning.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/01.3-Introduction-SupervisedLearning.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/01.d-Introduction-UnsupervisedLearning.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/02.1-LinearRegressionWithOneVariable-ModelRepresentation.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/02.2-LinearRegressionWithOneVariable-CostFunction.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/02.3-LinearRegressionWithOneVariable-CostFunctionIntuitionI.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/02.4-LinearRegressionWithOneVariable-CostFunctionIntuitionII.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/02.5-LinearRegressionWithOneVariable-GradientDescent.mp4
http://s3.amazonaws.com/stanford_videos/cs229/videos/02.6-LinearRegressionWithOneVariabl