Skip to content

Instantly share code, notes, and snippets.

Git Cheat Sheet

Commands

Getting Started

git init

or

@wsargent
wsargent / docker_cheat.md
Last active August 2, 2025 19:24
Docker cheat sheet
@aphyr
aphyr / gist:6266347
Last active December 21, 2015 06:48
In this ZK demo, a partition places the primary on the minority component. All
operations time out while the cluster converges on a new primary, at which
point three clients (talking to the three nodes in the majority component) can
proceed again. When the partition is healed, the two minority nodes can begin
accepting writes again. As with single-node Postgres, Zookeeper's client
protocol and ZAB both allow for false negatives (timeouts may actually succeed)
but not false positives (every successful write *will* be present in the final
set.)
HOW TO READ THIS CHART:
$ cat /media/state/units/docker-local.service
[Service]
Type=simple
ExecStartPre=/bin/systemctl kill docker.service
ExecStartPre=/bin/mount --make-rprivate /
# Enable forwarding to allow NAT to work
# TODO: Move this to sysctl.conf
ExecStartPre=/sbin/sysctl -w net.ipv4.ip_forward=1
# Try to use this alternate way of starting docker if docker crashes for you:
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active August 4, 2025 14:30
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vvuksan
vvuksan / README
Created August 16, 2011 22:01
LXC (Linux Containers Installation)
This works under Ubuntu 10.10. I tried under 10.04 LTS but the Ubuntu templates are not there. Investigating.
[ Leaving this link here for reference in case I need to do apt-get upgrade. @ohloh recommends it
http://sourceforge.net/mailarchive/message.php?msg_id=26885493 ]
To make things easy have libvirt installed ie.
sudo apt-get install libvirt-bin
Otherwise you will need to set up bridges, iptables, dnsmasq.
@napcs
napcs / .tmux.clipboard
Created August 15, 2011 19:28
My tmux config
# configuration for osx clipboard support
set-option -g default-command "reattach-to-user-namespace -l sh"
@niklas
niklas / lxc.rb
Created April 24, 2011 16:44
Setup an lxc-container (chef recipe)
package 'debootstrap'
package 'apt-cacher-ng'
package 'inotify-tools'
include_recipe 'lxc::manage'
include_recipe 'lxc::network_bridge'
include_recipe 'lxc::dns'
host = node[:container]