Skip to content

Instantly share code, notes, and snippets.

View CGA1123's full-sized avatar
🛰️

Christian Gregg CGA1123

🛰️
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 18, 2024 18:38
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@agnoster
agnoster / README.md
Last active September 25, 2024 09:27
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@davidpdrsn
davidpdrsn / bSort.sml
Last active June 2, 2016 13:22
Bubble sort in SML
(* sorted : int list -> bool
* check if a list of ints is sorted *)
fun sorted [] = true
| sorted [x] = true
| sorted (x::y::xs) = x < y andalso sorted (y::xs)
val sorted_test1 = sorted [1,2,3]
val sorted_test2 = not (sorted [2,1,3])
val sorted_test3 = not (sorted [2,3,1])
val sorted_test4 = sorted []