Skip to content

Instantly share code, notes, and snippets.

View andrewcrook's full-sized avatar

andrewcrook

  • UK
View GitHub Profile
@andrewcrook
andrewcrook / .bashrc
Created January 7, 2023 15:25 — forked from jaantollander/.bashrc
Adding to PATH in idempotent way, that is, without repetition.
# https://unix.stackexchange.com/a/124447
add_to_path() {
case ":${PATH:=$1}:" in *:"$1":*) ;; *) PATH="$1:$PATH" ;; esac;
}
# Example
add_to_path $HOME/bin/julia-1.6.1/bin
@andrewcrook
andrewcrook / racket-build.log
Created July 5, 2022 19:00
[Errors] Building racket-minimum from source on macOS on Apple Silicon
=== Racket CS enabled
checking build system type... aarch64-apple-darwin21.5.0
checking host system type... aarch64-apple-darwin21.5.0
checking target system type... aarch64-apple-darwin21.5.0
=== CS executables without suffix enabled
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
@andrewcrook
andrewcrook / mkd.sh
Last active December 25, 2021 23:07
/scripts/functions/
# add to .zshrc or .bashrc
# Create a new directory and enter it
function mkd() {
mkdir -p "$@" && cd "$_";
}
@andrewcrook
andrewcrook / gist:1826923
Created February 14, 2012 13:53
CompareWordList
Sub CompareWordList()
'
' CompareWordList Macro
' Andrew Crook 2012
' Based on - Highlight Words from a Word List
' http://word.tips.net/T000502_Highlight_Words_from_a_Word_List.html
'
Dim sCheckDoc As String
Dim docRef As Document
Dim docCurrent As Document
@andrewcrook
andrewcrook / redirect.js
Created July 1, 2011 10:38
sammy.js redirect problem
var app = $.sammy( function() {
this.get('#/', function() {
$('#main').html('nothing to see here!');
});
this.get('#/test', function() {
$('#main').html('worked');
});