Skip to content

Instantly share code, notes, and snippets.

View codeangler's full-sized avatar

Casey Burnett codeangler

View GitHub Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@darencard
darencard / auto_git_file.md
Last active May 1, 2024 23:18
Automatic file git commit/push upon change

Please see the most up-to-date version of this protocol on my blog at https://darencard.net/blog/.

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
@Avaq
Avaq / combinators.js
Last active May 19, 2024 00:21
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@wesbos
wesbos / settings.json
Created July 21, 2015 13:46
Wes Bos' Sublime Text Settings
{
"added_words":
[
"Mockup",
"plugins",
"coffeescript",
"sourcemaps",
"html",
"plugin",
"init",
@bradp
bradp / setup.sh
Last active May 20, 2024 12:29
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@raineorshine
raineorshine / git-essentials.sh
Created April 1, 2014 22:53
Git Cheat Sheet: Just the Essentials (13 Commands). See https://gist.github.com/5128563 for more.
# Status Commands - These are always safe to execute and don't change the repo.
git status # Print the status of the current repo
git log # Print a list of the most recent commits
git diff # Show all differences between unstaged changes
# and the last commit.
git remote -v # Show all remotes with name and url.
# Repo Commands - These modify the state of the repo in some way but do not modify files
git init # Initialize a new repo in the current folder
git add MYFILE # Add a file with changes to the staging area to be committed.
@raineorshine
raineorshine / cheatsheet-git.sh
Last active December 22, 2023 15:59
Cheatsheet: git commands
# adding and committing
git add -A # stages All
git add . # stages new and modified, without deleted
git add -u # stages modified and deleted, without new
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed.
git commit --amend --no-edit # Do so without having to edit the commit message.
# remotes - pushing, pulling, and tracking
git fetch # gets remote objects and refs. Needed if new branches were added on the remote.
git remote -v # Lists all remotes (verbose)