Skip to content

Instantly share code, notes, and snippets.

View yock's full-sized avatar

Michael Yockey yock

View GitHub Profile
@yock
yock / README.md
Created January 19, 2021 20:49 — forked from jamesmacfie/README.md
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@yock
yock / dev.forwarding.apache
Last active March 30, 2016 03:24 — forked from scottslowe/pf-launchd-item
This is a launchd item that you could use to automatically start pf on OS X Mountain Lion at boot.
<?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">
<dict>
<key>Label</key>
<string>dev.forwarding.apache</string>
<key>Program</key>
<string>/sbin/pfctl</string>
<key>ProgramArguments</key>
<array>
@yock
yock / decronym.php
Created October 3, 2015 19:13 — forked from Two9A/decronym.php
Decronym: A simple Reddit bot
<?php
/**
* Dirty, dirty Reddit bot: Decronym
*/
class Reddit {
const USERNAME = '***';
const PASSWORD = '***';
const CLIENTID = '***';
const SECRET = '***';
@yock
yock / readme.md
Last active August 29, 2015 14:01 — forked from cromwellryan/readme.md

Lineup

Grunt All The Things
[Rob Tarr][tarr]

How Program Can Procrastinate
[Mike Yockey][yockey]

Clean up your mixins
[Philip Zastrow][zastrow]

@yock
yock / warrior.rb
Last active August 29, 2015 13:57 — forked from robtarr/warrior.rb
class Player
def initialize
@last_health = 20
end
def play_turn(warrior)
possible_actions = actions.select { |action| action.can? @last_health }
possible_actions.first.go!