Skip to content

Instantly share code, notes, and snippets.

View rschmukler's full-sized avatar

Ryan Schmukler rschmukler

View GitHub Profile
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
let kCellName = "SearchResults"
var cell: UITableViewCell? // allow nil value for cell
cell = tableView.dequeueReusableCellWithIdentifier(kCellName) as? UITableViewCell // allow for nil value on first lookup
if(cell == nil) {
cell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: kCellName)
}
@rschmukler
rschmukler / rs2.zsh-theme
Last active September 22, 2015 20:32
My Zsh Theme
# Comment
PROMPT='%{$fg[white]%}☁ %{$fg[blue]%}%c %{$fg[red]%}$(git_prompt_info)%{$reset_color%}: '
RPROMPT='%{$fg[white]%}%n@%m%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%} ☯"
ZSH_THEME_GIT_PROMPT_CLEAN=""
DefinitionBlock ("DSDT-NEW.aml", "DSDT", 2, "ALASKA", "A M I", 0x00000015)
{
Name (SP1O, 0x4E)
Name (IOCE, 0x87)
Name (IOCL, 0xAA)
Name (IO1B, 0x0290)
Name (IO1L, 0x10)
Name (IO2B, 0x0A00)
Name (IO2L, 0x10)
Name (TCBR, 0xFED08000)
@rschmukler
rschmukler / fastsort.c
Created September 17, 2011 23:04
fastsort.c
/*
Name: Ryan Schmukler & Nate Sullivan
Date: 9/17/2012
Description: Fastsort
*/
#include <stdio.h>
#include <stdlib.h>
@rschmukler
rschmukler / invite_worker.rb
Created January 9, 2012 21:37
InviteWorker
class InviteWorker < IronWorker::Base
merge '../models/invite'
merge_gem 'actionmailer',:require=>'action_mailer'
merge_mailer '../mailers/invite_mailer'
attr_accessor :id
def run
i = Invite.find(@id)
i.send_invite
@rschmukler
rschmukler / Error
Created February 9, 2012 00:26
Capybara-Webkit Visibility Error
Failure/Error: login_user @user
Capybara::Driver::Webkit::Node::ElementNotDisplayedError:
This element is not visible so it may not be interacted with
# (eval):2:in `click_link'
# ./spec/support/acceptance_helper.rb:10:in `login_user'
# ./spec/acceptance/user_management_feature_spec.rb:12:in `block (2 levels) in <top (required)>'
var MathLibrary;
MathLibrary = (function() {
var PI, area;
function MathLibrary() {}
PI = 3.14;
area = function(radius) {
var Person, bob;
Person = (function() {
function Person() {}
Person.prototype.getName = function() {
return this.name;
};
var Person, bob;
Person = (function() {
var getName, setName;
function Person() {}
getName = function() {
return this.name;
};
@rschmukler
rschmukler / hyper-hello.rs
Created November 21, 2015 19:57
Rust Performance
extern crate hyper;
use hyper::Server;
use hyper::server::{Request, Response};
fn handle(_: Request, res: Response) {
res.send(b"Hello World!").unwrap();
}