git init project
git config --global user.name "Tim Berglund"
git config --global user.email "[email protected]"
git status
git add <file>
- Diff
git diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
sudo snap remove firefox | |
sudo add-apt-repository ppa:mozillateam/ppa | |
echo ' | |
Package: * | |
Pin: release o=LP-PPA-mozillateam | |
Pin-Priority: 1001 | |
' | sudo tee /etc/apt/preferences.d/mozilla-firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn column-names-seq | |
"Given an alphabet string generate a lazy sequences of column names | |
e.g. | |
`(column-names-seq \"abcdefghijklmnopqrstuvwxyz\") ;; => (\"a\" \"b\" \"c\" ... \"aa\" \"ab\")`" | |
[alphabet] | |
(->> (map str alphabet) | |
(iterate (fn [chars] | |
(for [x chars | |
y alphabet] | |
(str x y)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn location [] | |
[(rand-int 255) (rand-int 255)]) | |
(defn init-locations | |
[] | |
(for [i (range 5)] (location))) | |
(defn dist-vector | |
[[x1 y1] [x2 y2]] | |
[(- x1 x2) (- y1 y2)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while : | |
do | |
clear | |
git --no-pager log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojuredojo.core) | |
(defn palindrome-detector [thing] (= (reverse thing) (seq thing)) ) | |
(def __ palindrome-detector) | |
(false? (__ '(1 2 3 4 5))) | |
(true? (__ "racecar")) | |
(true? (__ [:foo :bar :foo])) | |
(true? (__ '(1 1 3 3 1 1))) |