Skip to content

Instantly share code, notes, and snippets.

View jgclark's full-sized avatar

Jonathan Clark jgclark

View GitHub Profile
@ttscoff
ttscoff / volumetoggle.rb
Created September 11, 2020 10:18
Script for macOS to save and restore audio input/output device and volume settings
#!/usr/bin/env ruby
# frozen_string_literal: true
# Brett Terpstra <https://brettterpstra.com>
#
# macOS: Stores all input/output devices and volume settings to a
# text file, restores on demand
#
## Dependencies
# SwitchAudioSource <https://github.com/deweller/switchaudio-osx>
@ttscoff
ttscoff / autooptim.rb
Last active December 26, 2020 16:47
Script intended for use with Hazel to resize/optimize web images based on directives in image filenames
#!/usr/bin/ruby
# Brett Terpstra <http://brettterpstra.com>
=begin
Example:
> file1@2x%%ohc.png
=> Converts png to jpeg, creates 1x and 2x versions, optimizes both with jpegoptim
Available directives:
@ttscoff
ttscoff / karabiner.json
Last active March 30, 2022 18:03
Karabiner Elements hyper key with escape
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
@alefteris
alefteris / .eslintrc
Created May 9, 2015 17:01
ESLint default config in YAML format
---
parser: espree
env:
amd: false
browser: false
es6: false
jasmine: false
jquery: false
meteor: false
mocha: false
@AnilRh
AnilRh / gist:8a0b372ffa9c4a68d6eb
Last active April 13, 2019 19:43 — forked from hvolkmer/gist:4020468
Import tasks from 2do database to OmniFocus 2
--------------------------------------------------
--------------------------------------------------
-- Import tasks from 2do database to OmniFocus 2
--------------------------------------------------
--------------------------------------------------
--
-- Original Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
-- This script forked from https://gist.github.com/hvolkmer/4020468
--
-- Step 1: Start with an empty Omnifocus database.