Skip to content

Instantly share code, notes, and snippets.

@wisicn
wisicn / gist:4983702
Created February 19, 2013 07:05 — forked from lieldulev/gist:3738681
video.js sample for a m3u8 HLS ABR content
<!doctype html>
<html>
<head>
<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
<video id="my_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="264" poster="my_video_poster.png"
data-setup="{}">
@wisicn
wisicn / demo.html
Created February 19, 2013 07:11
another video.js demo html from original source code repository, add the m3u8 sample
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<!-- Chang URLs to wherever Video.js files will be hosted -->
<link href="video-js.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
<script src="video.js"></script>
@wisicn
wisicn / Galaxy_nexus_app.csv
Last active December 13, 2015 22:59
record my android phone Galaxy Nexus app, especially the position in launcher
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 7. in line 1.
apk_name,apk_source,apk_link,folder,apk_position,comments
FT中文网,google_play,N/A,News,1:1:1:01,,
华尔街日报中文版,google_play,N/A,News,1:1:1:02,,
路透中文新闻,google_play,N/A,News,1:1:1:03,,
NetEase News,google_play,N/A,News,1:1:1:04,,
CNN,google_play,N/A,News,1:1:1:05,,
BBC News,google_play,N/A,News,1:1:1:06,,
China AQI,google_play,N/A,News,1:1:1:07,,
eduPort,google_play,N/A,Education,1:1:2:01,,
TED,google_play,N/A,Education,1:1:2:02,,
@wisicn
wisicn / dnsmasq.conf
Created February 21, 2013 17:32
my dnsmasq configuration for both DNS/DHCP/TFTP
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# General Configure
#Don't read /etc/resolv.conf. Get upstream servers only from the command line or the dnsmasq configuration file.
no-resolv
#Don't poll /etc/resolv.conf for changes.
no-poll
#upstream server is google
server=8.8.8.8
server=8.8.4.4
#CN TLD is 114.114.114.114
@wisicn
wisicn / swissarmy.txt
Last active May 21, 2022 12:20
my linux swiss army knife tools sed/grep/awk collection
#Deleting comment lines starting with a special symbol
sed '/^\#/d' myFile > output.txt
#delete empty lines with SED
sed '/^$/d' myFile > output.txt
#mv empty lines and comments lines together
sed '/^\#/d' myFile | sed '/^$/d' > output.txt
#To remove all leading whitespace (including tabs) from left to first word
sed -e 's/^[ \t]*//' myFile > output.txt
sed -e 's/^\s*//' myFile > output.txt
#To delete trailing whitespace from end of each line
@wisicn
wisicn / fixBrew
Last active August 29, 2015 14:07 — forked from nmccready/fixBrew
#!/bin/sh
#reinstall everything you currently have in brew
for f in `brew list`; do
echo $f
brew uninstall $f && brew install $f
done
@wisicn
wisicn / .rtorrent.rc
Last active August 29, 2015 14:07 — forked from wangyan/.rtorrent.rc
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# 每个种子所允许的最小最大连接数
#min_peers = 40
#max_peers = 100
# 同上,但仅针对已完成的种子(-1 表示与下载中的种子一致)
#min_peers_seed = 10
@wisicn
wisicn / rtorrent.sh
Last active August 29, 2015 14:07 — forked from wangyan/rtorrent.sh
#!/bin/sh
case "$1" in
start)
echo -n "Starting rtorrent"
su - root -c "screen -A -m -d -S rtorrent /usr/local/bin/rtorrent" &
echo "."
;;
stop)
echo -n "Stopping rtorrent"

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@wisicn
wisicn / enable-ntfs-write-os-x-yosemite.md
Last active November 12, 2015 18:49
Enable NTFS Write support on Mac OS X Yosemite with Homebrew and Homebrew Cask

Last update: 2015/01/17

1. install lastest Xcode with Mac App Store

2. check if we have Xcode Command Line Tools installed

xcode-select -p

if we do not have it, install it by

xcode-select --install