Skip to content

Instantly share code, notes, and snippets.

@sunsong
sunsong / git-barify.sh
Last active February 24, 2017 05:30
Stash all changes in each git folder, make those folders bare repositories in a root folder
#!/bin/bash
#################
#
# Author: Song Sun
# Github: https://github.com/sunsong
# Date: Aug 31, 2016
# Description: Stash all changes in each git folder, make those folders bare repositories in a root folder
# Feature:
# * Make a git repository to a bare repository
@jniltinho
jniltinho / install_golang.sh
Last active August 2, 2024 04:53
Install Golang on Linux
#!/bin/bash
## Install Golang Stable 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS)
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html
## Run as root (sudo su)
## Thank's @geosoft1 | @gwmoura
GO_URL="https://go.dev/dl"
GO_VERSION=$(curl -s 'https://go.dev/VERSION?m=text'|head -n1)
GO_FILE="$GO_VERSION.linux-amd64.tar.gz"
@bdarnell
bdarnell / streaming.py
Created January 11, 2015 21:23
Demo of streaming requests with Tornado
"""Demo of streaming requests with Tornado.
This script features a client using AsyncHTTPClient's body_producer
feature to slowly produce a large request body, and two server
handlers to receive this body (one is a proxy that forwards to the
other, also using body_producer).
It also demonstrates flow control: if --client_delay is smaller than
--server_delay, the client will eventually be suspended to allow the
server to catch up. You can see this in the logs, as the "client
@takuma7
takuma7 / opencv-fourcc-on-mac-os-x.md
Last active April 3, 2024 07:29
OpenCV Video Writer on Mac OS X
@arunoda
arunoda / gist:7790979
Last active September 10, 2024 08:43
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
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

@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@harvimt
harvimt / quotes.txt
Last active April 30, 2017 11:10
Quotes
“I’ve just got to say one thing: If this is it, if this is really the end—I get to use a rocket launcher.”
—Winston, Human Target (2010) S02E07
~~
“Behind the velvet lies / There is a truth as hard as steel.”
—“Holy Diver” by Dio
~~