Skip to content

Instantly share code, notes, and snippets.

View vansteki's full-sized avatar
🍵

vansteki vansteki

🍵
  • Taiwan
View GitHub Profile

Keybase proof

I hereby claim:

  • I am vansteki on github.
  • I am vansteki (https://keybase.io/vansteki) on keybase.
  • I have a public key ASBmHIwMPaMBaNcuET8OyzxG-7HhKvzOQzsMWqPnjwbI1Qo

To claim this, I am signing this object:

@vansteki
vansteki / gist:975a61cdfb323a2856ae04986a7b01af
Created February 18, 2019 08:56 — forked from bradgorman/gist:4247000
JavaScript - iOS/Safari Photo Upload, Manipulation
<!DOCTYPE html>
<html>
<head>
<title>iOS6 Safari Photo Capture Demo</title>
<script type="text/javascript">
window.onload = function() {
var input = document.getElementById("input");
input.addEventListener("change", handleFile);
}
@vansteki
vansteki / cherry pick to multiple branches
Created January 21, 2019 04:05 — forked from klausbayrhammer/cherry pick to multiple branches
cherry-pick a commit to multiple branches
#!/bin/bash
function merge {
git pull --rebase
git cherry-pick -x $1
git status
echo "Commit? (y/n):"
read XN
@vansteki
vansteki / git-sync-all-branches.sh
Created August 2, 2018 04:12 — forked from piaoger/git-sync-all-branches.sh
git-sync-all-branches
# fetch all branches
# From: http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
git fetch --all
@vansteki
vansteki / ajax_beforeSend.js
Created April 3, 2018 03:01
Intercept jQuery ajax before send
$.ajaxSetup({
beforeSend: function(xhr, setting) {
console.log("intercept before ajax send");
console.log(xhr, setting);
}
});
@vansteki
vansteki / tmux.md
Created December 18, 2017 02:42 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@vansteki
vansteki / README.md
Created May 22, 2017 14:13 — forked from githubutilities/README.md
Shadowsocks proxy and ssh proxy

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@vansteki
vansteki / s2.json
Last active December 1, 2016 09:28
{
"status": {
"code": 200
},
"result": [{
"category": "taiwan",
"sources": [{
"show": "緯來體育台",
"tv_rtmp": "rtmp://49.246.248.130/live/tv722"
@vansteki
vansteki / motionapi.json
Last active November 23, 2016 07:44
motionapi.json
[
{
"category": "taiwan",
"sources": [
{
"team":"台湾,台视(主)",
"tv_rtmp":"rtmp://49.246.248.130/live/tv072"
},
{
"team":"台湾,中视(主)",
{
"days": [
{
"channels": [
{
"channel":"1채널",
"time": "21:00",
"game": "스파르타 프라하 (U21) vs FC 슬로반 리베레츠 (U21)"
},
{