This file contains hidden or 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
#!/usr/bin/env bash | |
# Find and delete empty directories in $1 | |
find $1 -empty -type d -delete |
This file contains hidden or 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
{-# language TypeFamilies #-} | |
{-# language TypeOperators #-} | |
{-# language DeriveFunctor #-} | |
{-# language TypeInType #-} | |
{-# language UndecidableInstances #-} | |
{-# language ViewPatterns #-} | |
{-# language ConstraintKinds #-} | |
{-# language GADTs #-} | |
module TicTacToe where |
This file contains hidden or 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
#! /usr/bin/env bash | |
git --no-pager diff -w $1 | pbcopy |
This file contains hidden or 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
### Force English ### | |
defaults write org.gnucash.Gnucash AppleLanguages '(en)' | |
defaults write org.gnucash.Gnucash AppleLocale 'en_US' | |
### Revert to system settings ### | |
defaults delete org.gnucash.Gnucash AppleLanguages | |
defaults delete org.gnucash.Gnucash AppleLocale |
This file contains hidden or 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
;;; eio.el --- Support for creating Elisp exercises | |
;; Author: Jason Lewis | |
;; Created: 5 June 2015 | |
;; This file is not part of GNU Emacs. | |
;;; Commentary: | |
;; | |
;; Provides utility functions for stubbing elisp exercises |
This file contains hidden or 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
import CoreGraphics | |
public extension CGRect { | |
func subtract(_ subtrahend: CGRect, edge: CGRectEdge) -> CGRect { | |
guard intersects(subtrahend) else { return self } | |
let intersectSize: CGSize = intersection(subtrahend).size | |
let distance: CGFloat = (edge == .minXEdge || edge == .maxXEdge) |
This file contains hidden or 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
#! /usr/bin/env nix-shell | |
#! nix-shell -i bash -p bash | |
deps () { | |
nix-store --query --references $1 | |
} | |
deriver () { | |
nix-store -qd $1 | |
} |
This file contains hidden or 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
#! /usr/bin/env bash | |
for pubkey in ~/.ssh/*.pub; do | |
ssh-keygen -E md5 -lf $pubkey | |
end |
This file contains hidden or 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 | |
# Taken from: | |
# https://github.com/mmhelloworld/idris-jvm/blob/aa5049a/bin/travis_long | |
$* & | |
pidA=$! | |
minutes=0 | |
while true; do sleep 60; ((minutes++)); echo -e "\033[0;32m$minutes minute(s) elapsed.\033[0m"; done & |
This file contains hidden or 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
#(set! paper-alist | |
(cons '("my size" . (cons (* 2 8.5 in) (* 4 11 in))) | |
paper-alist)) | |
\setOption naptaker.staff-size #26 | |
\setOption naptaker.paper-size #"my size" | |
\setOption naptaker.paper-orientation #'landscape |