Skip to content

Instantly share code, notes, and snippets.

View CGA1123's full-sized avatar
🛰️

Christian Gregg CGA1123

🛰️
View GitHub Profile
@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 []
@agnoster
agnoster / README.md
Last active September 12, 2024 13:53
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

@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
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active September 22, 2024 08:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname