Skip to content

Instantly share code, notes, and snippets.

View urfolomeus's full-sized avatar

Alan Gardner urfolomeus

View GitHub Profile
# Prerequisit: ImageMagick installed
def file_exists?(filename)
`[ -f #{filename} ] && echo "Found" || echo "Not found"` == "Not found\n"
end
['landing'].each do |screengrab_file_name|
before = screengrab_file_name + '_before.png'
after = screengrab_file_name + '_after.png'
difference = screengrab_file_name + '_difference.png'
@paulanthonywilson
paulanthonywilson / cheatsheet.md
Last active August 29, 2015 14:23
Spacemacs Cheatsheet

Spacemacs Cheatsheet

General

  • spc f s Save a buffer
  • spc f S Save all opened buffers
  • spc b s Open (switch) to a buffer with helm

NeoTree

#!/bin/bash
if [ ! -z "$(find ~/.mail/*/INBOX -type f)" ]; then
printf '📥 '
for box in `ls ~/.mail | grep -v temp`; do
emails=$(find ~/.mail/$box/INBOX -type f | wc -l)
[ $emails -ne 0 ] && printf '%s:%d ' ${box:0:1} $emails
done
printf '~\n'
fi