Skip to content

Instantly share code, notes, and snippets.

View ianthekirkland's full-sized avatar

Ian Kirkland ianthekirkland

View GitHub Profile
<!doctype html>
<meta charset=utf-8>
<meta name=viewport content=width=device-width,initial-scale=1>
<style>
* {
line-height: 1.1;
word-wrap: break-word;
}
body {
font: 16px Georgia, serif;
@ianthekirkland
ianthekirkland / dontforget.bash
Created April 29, 2021 18:52 — forked from ttscoff/dontforget.bash
Quick reminders from Terminal (bash)
#!/bin/bash
# dontforget
#
# A stupid script for short term reminders in bash
#
# Arguments just need to contain a number and a bunch of words.
#
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
#
@ianthekirkland
ianthekirkland / JerryLib.scptd
Created January 22, 2020 19:03 — forked from jerrykrinock/JerryLib.scptd
My personal utility library of AppleScript handlers, and some one-liners
-- To load this library, see section titled "-- Using a handler in a .scpt library" at the top of One_Liners.scpt.
on testJerryLib()
return 0
end testJerryLib
(* The bad thing about this handler is that it always asks the user for admin credentials whether or not they are actually needed to answer the question on the given path.
Obviously, you can remove the 'with adminstrator privileges'. Unfortunately, this will cause the method to return 'false' if an existing path cannot be probed because of bad permissions. I can't see any way to differentiate between inadequate permissions and nonexisting file because they both set errNumber = 54.
The -e checks for directories or files. To require that the given path be a directory, use -d. For file, use -f. For more variations, see:
http://www.cyberciti.biz/tips/find-out-if-file-exists-with-conditional-expressions.html *)

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@ianthekirkland
ianthekirkland / yaml-to-plist.rb
Created April 6, 2016 00:31 — forked from kch/yaml-to-plist.rb
Writes ruby object structures to plists. When called directly, takes a YAML file.
#!/usr/bin/env ruby
# encoding: UTF-8
require 'yaml'
require 'rexml/document'
class PlistWriter
PLIST_STUB_DOC = %q[
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"></plist>]
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@ianthekirkland
ianthekirkland / gist:4625644
Created January 24, 2013 17:45 — forked from than/gist:3919174
Simplenote in Menubar
/* -------------------------------------------------
SIMPLENOTE IN YOUR MENUBAR / FLUID.APP USERSTYLES
Than Tibbetts
http://thanland.com/notes/put-simplenote-in-your-menubar-with-fluid
------------------------------------------------- */
.wrapper { top: 20px !important; height: 92%; }
.sidebar { float: left; width: 100% !important; height: 50%; background: none !important; border-right: none !important; border-bottom: 2px solid rgba(0, 0, 0, 0.398438); border-bottom-left-radius: 0 !important; }
@ianthekirkland
ianthekirkland / snap.sh
Created December 15, 2012 17:27 — forked from anonymous/snap.sh
Apple Store Picture Taker
FILENAME=/Users/apple/Desktop/`date "+%c"`.jpg
#echo $FILENAME
/Users/apple/Downloads/ImageSnap-v0.2.5/imagesnap "$FILENAME"
@ianthekirkland
ianthekirkland / gist:3912595
Created October 18, 2012 15:33 — forked from michaelcpuckett/gist:3912558
brace expansion with mkdir
mkdir -p {test1,test2}/{test3,test4}
gives me test1/test3, test1/test4, test2/test3 and test2/test4
mkdir -p {test1,test2}/{test3,test4/{test5,test6}}
@ianthekirkland
ianthekirkland / pyget2.py
Created August 12, 2012 02:25 — forked from sajithdilshan/pyget2.py
A python download accelerator
#!/usr/bin/env python
#
# pyget2.py
# A python download accelerator
#
# This file uses multiprocessing along with
# chunked/parallel downloading to speed up
# the download of files (if possible).
#
# @author Benjamin Hutchins