Skip to content

Instantly share code, notes, and snippets.

Kyle Fuller kylef

Block or report user

Report or block kylef

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kylef / dict.c
Created Mar 27, 2009
A key/value dictionary system in C
View dict.c
/* A key/value dict system in C */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TEST TRUE /* Comment this line out to compile without a main function (used when including into another application). */
typedef struct dict_t_struct {
char *key;
void *value;
#!/usr/bin/env bash
# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.
git clone --depth 1 ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install -s
kylef /
Created Jan 11, 2010
SABnzbd python api
import urllib, json
class SABnzbd(object):
>>> from sabnzbd import SABnzbd
>>> s = SABnzbd('sakar.local', 8080, '4488f2881b90d7753bef8fb9e1bc56b3')
>>> s.pause() # Pauses the downloads
>>> s.shutdown() # Shut's down SABnzbd+

Keybase proof

I hereby claim:

  • I am kylef on github.
  • I am kylef ( on keybase.
  • I have a public key whose fingerprint is BB7D D311 C34B 09C9 0FD1 1258 93AB E8C2 33AC D3D5

To claim this, I am signing this object:

kylef / Toggle Mute (Skype)
Created May 31, 2009
Applescript to toggle mute on Skype
View Toggle Mute (Skype)
tell application "Skype"
if (send command "GET MUTE" script name "MuteToggler") is equal to "MUTE ON" then
send command "SET MUTE OFF" script name "MuteToggler"
send command "SET MUTE ON" script name "MuteToggler"
end if
end tell
kylef / instance-swizzle.m
Last active Jan 2, 2016
Replace a method on an instance at runtime
View instance-swizzle.m
+ (void)load {
/* We want to add our method after the application has finished launching
because that's when the key window should be setup.
We will add a method to that instance. */
This would fail if another object was to key value observe the object
we are going change the class of before we change it. That means before
kylef /
Last active Dec 27, 2015
Git post-checkout hook to install CocoaPods
### CocoaPods git-checkout hook
# This is a hook which you can install, it will automatically
# run `pod install` when you do a git pull/clone/checkout.
# The hook can be used to make CocoaPods usable with Xcode CI.
## Installation
kylef /
Last active Dec 22, 2015
Problem reporting guide

When reporting any problems, please provide all the information outlined below so we can properly diagnose the problem.

  • Classification: Security, Crash/Hang/Data Loss, Performance, UI/Usability, Serious Bug, Other Bug, Feature, Enhancement
  • Reproducability: Always, Sometimes, Rarely, Unable, Not Applicable
  • Device For example: iPad 3 or iPhone 5 GSM
  • Operating System Version: For example: iOS 6.1.3
  • Application Version: For example: 1.0-3-gefebej (553)
  • Steps to reproduce: Describe exactly every step you had to do to produce the problem.
  • Expected Results: Describe what you expected to experiance after completing the above steps.
  • Actual Behaviour: Describe what actually happened after completing the steps above.
kylef /
Last active Dec 21, 2015
Search the current directory for unused images. Useful for finding leftover assets from files which exist in Xcode project or in your repository.
# This simple python utility crawls the current directory and finds all images.
# It will then search the directory for files using these images and also mark
# any xcode projects which include these images.
# Allowing you to easily find images which are no longer used (or even images
# included in xcode and not used).
# Usage, cd into your repository and then run:
# curl -# | python -
View KFLinkHeader.m
HTTP Link header parser (
License: BSD
NSDictionary *links = KFParseRelativeLinks(@"<>; rel=next");
NSURL *nextURL = links[@"next"];
NSDictionary *KFParseRelativeLinks(NSString *header) {
NSMutableDictionary *links = [[NSMutableDictionary alloc] init];
You can’t perform that action at this time.