As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
# pre-commit git hook to check the validity of a puppet manifest | |
# | |
# Prerequisites: | |
# gem install puppet-lint puppet | |
# | |
# Install: | |
# /path/to/repo/.git/hooks/pre-comit | |
# Source RVM if needed |
# good git book | |
http://git-scm.com/book | |
# Discard uncommitted changes in a specific file | |
git checkout file_name | |
# Clear everything not in repo | |
git checkout -- . | |
# A way to quickly move to the previous commit in a git branch. This also way for "deleting" last commit. |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everday and this Gist is the first bookmark on my list for quick and easy access.
I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
#!/usr/bin/env/python | |
# | |
# More of a reference of using jinaj2 without actual template files. | |
# This is great for a simple output transformation to standard out. | |
# | |
# Of course you will need to "sudo pip install jinja2" first! | |
# | |
# I like to refer to the following to remember how to use jinja2 :) | |
# http://jinja.pocoo.org/docs/templates/ | |
# |