Skip to content

Instantly share code, notes, and snippets.

@steven2358
steven2358 / ffmpeg.md
Last active October 27, 2025 18:19
FFmpeg cheat sheet
@inadarei
inadarei / minikube-sierra.md
Last active October 20, 2020 01:57
Minikube Setup: Docker for Mac / Sierra

Prerequisite: latest Docker for Mac on MacOS Sierra

$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
@boredzo
boredzo / colorman.zsh
Last active June 19, 2017 14:44 — forked from cocoalabs/gist:2fb7dc2199b0d4bf160364b8e557eb66
Color Terminal for bash/zsh etc..
man() {
env \
LESS_TERMCAP_md=$'\e[1;36m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[1;40;92m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[1;32m' \
man "$@"
}
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active October 29, 2025 09:08
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@JingwenTian
JingwenTian / curl-example.md
Created October 21, 2014 16:21
linux curl 命令详解,以及常用curl实例 ( http://blog.51yip.com/linux/1049.html
  1. 抓取页面内容到一个文件中

curl -o home.html http://jingwentian.com

2.用-O(大写的),后面的url要具体到某个文件,不然抓不下来。我们还可以用正则来抓取东西

curl -O http://jingwentian.com/logo.png 
curl -O http://jingwentian.com/uploads/2010/[0-9][0-9]/demo.jpg  
@morhekil
morhekil / nginx.conf
Created August 14, 2014 12:18
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@danfinlay
danfinlay / How to download streaming video.md
Last active August 14, 2025 12:20
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@anylzer
anylzer / fetion.rb
Created July 8, 2011 14:08
ruby fetion
#!/usr/bin/ruby
# Using GPL v2
# Author:: DongYuwei(mailto:newdongyuwei@gmail.com)
# 更新部分内容应对2010年7月25日飞信升级
require 'uri'
require 'net/http'
require 'net/https'
require "socket"
require 'rexml/document'
@jakebellacera
jakebellacera / ICS.php
Last active October 21, 2025 12:28
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*