Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
When am I not writing code?

Wess Cope wess

💭
When am I not writing code?
View GitHub Profile
View gist:9602507
### Keybase proof
I hereby claim:
* I am wess on github.
* I am wess (https://keybase.io/wess) on keybase.
* I have a public key whose fingerprint is 37EF CD5E 6CA3 1720 4420 B656 BBFD AE20 EBFF 3CFA
To claim this, I am signing this object:
View gist:11274402
/// Root Class
@interface Root : NSObject
@end
@implementation Root
static NSString *const SelectorSuffix = @":";
- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
View gist:11288919
@implentation UserForm
- (SurveyTextField *)username
{
return SurveyDefineTextField(^(SurveyTextField *field) {
field.placeholder = @"username";
});
}
// OR
View gist:11288050
//
// SEUserForm.m
// SurveyExample
//
// Created by Wess Cope on 4/24/14.
// Copyright (c) 2014 Wess Cope. All rights reserved.
//
#import "SEUserForm.h"
View gist:fd5ea6fa7f56ba118009
[self.view animate:^(Animator *animator) {
animator.x.from = 10;
animator.x.to = 20;
animator.gravity = 5;
animator.elastic = 2;
}];
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
View gist:ec05a67c42419cd3491c
;(function(exports){
var Namespace = exports.Namespace || {};
exports.Namespace = Namespace;
})(window);
View centerstage
#!/usr/bin/env ruby
require 'thor'
require 'open-uri'
require 'fileutils'
require 'etc'
require 'zip'
require 'erb'
URL = "https://github.com/wess/center-stage/archive/master.zip"
View daemon.py
import sys
import os
import time
import atexit
from signal import SIGTERM
class Daemon:
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
self.pidfile = pidfile
View gist:ee99efffd37fc7e37491
- (void)saveModel:(MTLModel *)model forKey:(NSString *)key error:(NSError *__autoreleasing *)error
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *path = [self pathForModel:model];
path = [path stringByAppendingPathComponent:key];
}
- (MTLModel *)objectForKey:(NSString *)key