Skip to content

Instantly share code, notes, and snippets.

View langford's full-sized avatar

Michael Langford langford

View GitHub Profile
activate application "Safari"
repeat 100 times
tell application "System Events"
key code 28 using {shift down}
keystroke "a"
key code 34 using {shift down}
key code 124
delay (1)
end tell
end repeat
Hi there Billy!
First off, there are hundreds if not thousands of other RPGs out there besides
D&D, especially a set of very modern ones (not the ones I mention below) from
the last 15 years or so that are laser focused on "getting the game to be
exactly what you want it to be", and ones that are focused on things other than
"a zero to hero narrative about people who go into places not inhabited by good
humans, and take their stuff". Let me know if you want more about those for a
particular experience.
@langford
langford / gist:7803283e9a232f5e85ef
Created June 11, 2015 05:32
Clojure Meetup on 6/9
Introduction to Pedestal --- They finally had a recruiter.
Rentpath is looking for a senior clojure and senior ruby
CareerBuilder is looking for a clojure person. They're moving a lot of stuff to clojure.
Stuart Hinson, asked about familiarity with Ring, works at RentPath
Aims to be simple.
@langford
langford / Apple.style
Created January 2, 2014 17:54
This format file does 99% of what I want out of my code's formatting It's only big flaw is that it overindents blocks (which will need to be fixed by the tool writer). There is a workaround for for another bug as well in the spec. All and all, pretty good. strictcodeapp.com
! DO NOT CHANGE THIS FILE MANUALLY !
STYLE_NAME=Apple
S_NAME=array
S_BEG
name[SOME]
S_END
@langford
langford / gist:6165405
Last active December 20, 2015 16:59
.profile script to make git colorize and show what state your repo is in.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
function parse_git_branch_remote {
git rev-parse --git-dir > /dev/null 2>&1
if [ $? -eq 0 ]; then
#include "limits.h"
volatile int char_min = CHAR_MIN;
void limitPrint(void) {
printf("Size of Boolean type is %d byte(s)\n\n",
(int)sizeof(_Bool));
printf("Number of bits in a character: %d\n",
@langford
langford / gist:1045517
Created June 24, 2011 19:42
Why is my UI frozen during this?
[UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionBeginFromCurrentState animations:^(void){
self.clippingContainerView.alpha = 1.0;
} completion:^(BOOL finished){
[UIView animateWithDuration:0.5 delay:5.5 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionBeginFromCurrentState animations:^(void){
self.clippingContainerView.alpha = 0.0;
} completion:^(BOOL finished){
self.state = cvcStateHiddenControls;
}];
}
];
@langford
langford / InternetFailoverPlan
Created April 29, 2011 19:40
$212 upfront/ $624 Annual Internet failover plan
I've been having some connectivity problems off and on the last few
weeks due to storms taking out some combination of power/internet or
damaging some of the networking equipment here (in spite of the surge
protectors, etc in place) as well as a incident with bad wiring
getting worse due to storms/electrical shorts.
While the iPhone's tethering was a stopgap measure that helped in the
meanwhile, it was by no means a final solution, nor did it allow
efficient completion of the tasks at hand nor good communication while
things were going on as the phone would overheat if I left it running
@langford
langford / resize_icons.sh
Created April 29, 2011 16:54
Make other icons from 512x512
#!/bin/bash
export CONVERSIONAPP="/Applications/ImageMagick-6.5.8//bin/convert"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Applications/ImageMagick-6.5.8//lib"
export MAGICK_HOME="/Applications/ImageMagick-6.5.8/"
$CONVERSIONAPP SpecificArtAssets/icons/512x512.png -resize 57x57 GeneratedFiles/Icon.png
$CONVERSIONAPP SpecificArtAssets/icons/512x512.png -resize 114x114 GeneratedFiles/Icon@2x.png
$CONVERSIONAPP SpecificArtAssets/icons/512x512.png -resize 72x72 GeneratedFiles/Icon-72.png
$CONVERSIONAPP SpecificArtAssets/icons/512x512.png -resize 29x29 GeneratedFiles/Icon-Small.png
$CONVERSIONAPP SpecificArtAssets/icons/512x512.png -resize 50x50 GeneratedFiles/Icon-Small-50.png
@langford
langford / gist:b010bbad7c828a54c0f1
Created April 22, 2015 21:17
MACRO VERSION OF NEO NACHO'S ABOMINATION
#define LET(name,initializer) const typeof(initializer) (name) = (initializer)
#define VAR(name,initializer) typeof(initializer) (name) = (initializer)
void letsCry(void){
VAR(bojangles,@{}.mutableCopy);
bojangles = @{@"derp":@"yerp"};
NSLog(@"Bojangles is: %@",bojangles);