Skip to content

Instantly share code, notes, and snippets.

View mjmeintjes's full-sized avatar

Matt Meintjes mjmeintjes

  • Mattsum Limited
View GitHub Profile
@mjmeintjes
mjmeintjes / assertion.cljc
Last active August 3, 2022 22:01
Example of using truss with scope-capture
(ns mattsum.assertion
(:require [taoensso.truss :as truss]
#?(:clj [taoensso.truss.impl :as impl :refer [-invariant]])
#?(:cljs [taoensso.truss.impl :as impl :refer-macros [-invariant]])
[clojure.string :as str]))
(defn try-resolve [s & args]
#?(:clj
(try
@mjmeintjes
mjmeintjes / gist:049302ab5a04d395f3ea
Last active August 29, 2015 14:23
Google Results
(function(){
var v = "1.3.2";
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) {
var done = false;
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js";
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
sudo apt-get -y update
sudo apt-get -y install zsh curl wget tmux vcsh git
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
#change sudo vi /etc/passwd #change shell to /bin/zsh
mkdir ~/tmp -p
cd ~/tmp
wget https://github.com/clvv/fasd/tarball/1.0.1
cd clvv-fasd-4822024
sudo make install
git clone git@bitbucket.org:mjmeintjes/dotfiles.git $HOME/.dotfiles
@mjmeintjes
mjmeintjes / gist:1065204
Created July 5, 2011 16:35
Install requirements for new Linux system
sudo apt-get install mercurial
@mjmeintjes
mjmeintjes / gist:1065123
Created July 5, 2011 16:03
Enable location bar in Linux Mint
gconftool-2 --type=Boolean --set /apps/nautilus/preferences/always_use_location_entry true
nautilus -q
@mjmeintjes
mjmeintjes / .bashrc
Created July 5, 2011 16:01 — forked from henrik/.bashrc
Git branch and dirty state in Bash prompt.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"