Skip to content

Instantly share code, notes, and snippets.

View dontcry2013's full-sized avatar

Zac Qin dontcry2013

View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@alienresident
alienresident / video-fix-videos-for-pseudo-streaming.md
Last active April 20, 2024 05:02
How to: Fix pseudo-streaming videos by moving Moov Atom
How to:

Fix pseudo-streaming videos by moving Moov Atom

Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.

What is pseudo-streaming?

Pseudo streaming is simply a video that can start playing before it's fully dowmloaded. The videos are not streaming but rather progressively downloaded. What's important is that the file metadata (the Moov Atom) is at the start of the file rather than at the end. Usually this is an option set when encoding the file (called quick start or web start). If the files have not been encoded this way you can either re-encode or use a utility to move the Moov Atom. Re-encoding takes much longer than using a utility to move the Moov Atom so here's how to do it.

Steps

First check with mediainfo to see if video 'is streamable':

@jorben
jorben / some_shit.js
Created July 15, 2014 08:23
JAVASCRIPT的一些坑
// 坑一、js的基本类型有那些?
number string boolean object null undefined
typeof null //===>"object"
//这只能说是最初的JavaScript实现的bug,而现在标准就是这样规范的.
//V8曾经修正并实现过typeof null=== "null",但最终证明不可行.http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null
// 坑二、NaN isNaN
isNaN('a') //===>true
isNaN('09') //===>false
@adoyle-h
adoyle-h / Scrum-Intro.md
Last active January 1, 2022 17:51
Scrum介绍

Scrum

什么是Scrum?

  • Scrum是一种迭代式增量软件开发过程,通常用于敏捷软件开发。Scrum在英语里是橄榄球运动中争球的意思,强调迅速,自我管理和可适应性。 虽然Scrum是为管理软件开发项目而开发的,它同样可以用于运行软件维护团队,或者作为计划管理方法。

谁会用到Scrum?

  • 产品经理
  • 项目经理
  • 开发人员
  • 测试人员
@revolunet
revolunet / python-es6-comparison.md
Last active April 22, 2024 19:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@anvaka
anvaka / 00.Intro.md
Last active July 4, 2024 09:20
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@jorben
jorben / git_toturial
Created November 27, 2015 02:15 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@subfuzion
subfuzion / curl.md
Last active July 16, 2024 16:18
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@knight42
knight42 / naive-request.js
Last active December 8, 2016 08:37
naive promisified request
#!/usr/bin/node
"use strict";
const net = require('net');
const url = require('url');
const qs = require('querystring');
function request(opts) {
if(! /^https?:\/\//.test(opts.url)) opts.url = `http://${opts.url}`;
@jorben
jorben / openssl_tool.txt
Last active August 6, 2018 02:06
RSA加解密,签名、验签文件
1) Generate RSA key:
$ openssl genrsa -out key.pem 1024
$ openssl rsa -in key.pem -text -noout
2) Save public key in pub.pem file:
$ openssl rsa -in key.pem -pubout -out pub.pem
$ openssl rsa -in pub.pem -pubin -text -noout
3) Encrypt some data: