Skip to content

Instantly share code, notes, and snippets.

View shanev's full-sized avatar
💭
#BUIDL

shane.stars shanev

💭
#BUIDL
View GitHub Profile
OSStatus PrimeEffect(UInt32 inEffectID, ALuint *sourceID)
{
// Locate an available source. We consider a source available if it is either not primed or is in the stoppped state
for (int i = 0; i < MAX_SOURCES; ++i){
if (! mSourcePrimed[i]){
mSourcePrimed[i] = TRUE;
alSourcei(mSourceID[i], AL_BUFFER, inEffectID);
*sourceID = mSourceID[i];
return alGetError();
}
@shanev
shanev / coffee_sf.md
Created August 2, 2011 01:13
Work-friendly Coffee Shops in SF

Mission

  • Coffee Bar (3)
  • Stable Cafe (piaf w/ bacon)
  • Haus
  • Philz
  • Ritual
  • Rogers

Hayes Valley

  • Cafe Arlequin
irb(main):003:0> require 'rubygems'
=> true
irb(main):004:0> require 'twitter'
NameError: constant URI::WFKV_ not defined
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/backports/uri/common_192.rb:53:in `remove_const'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/backports/uri/common_192.rb:53:in `<module:URI>'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/backports/uri/common_192.rb:19:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/utils.rb:12:in `<top (required)>'

MacBook Pro

15-inch, mid-2010

2.66 Ghz Intel Core i7

8GB RAM

serial: W80186M8AGZ

Lion 10.7.2

@shanev
shanev / known_issues_dk36b.md
Created November 16, 2011 21:58
Drum Kit 3.6 Beta: Known Issues
  • Facebook posting is broken
//
// StachifyDefaults.m
//
// Created by Shane Vitarana on 12/8/11.
// Copyright (c) 2011 CrimsonJet LLC. All rights reserved.
//
#import "StachifyDefaults.h"
@implementation StachifyDefaults
@shanev
shanev / recipes.md
Last active September 28, 2015 22:08
Shane's recipes

Mushroom bun burger

  • 1lb grass-fed ground beef
  • large portobello mushroom
  • onions/tomatoes/lettuce
  • garlic/salt/pepper
  • oil/ghee

Combine garlic, salt, pepper, beef, and make a patty. Oil cast-iron pan. Sear each side on high heat for 1 minute. Reduce heat and cook each side for an additional 2-3 minutes. Cook mushroom in leftover grease in the pan. Serve burger over mushroom and top with onions/tomato/lettuce. Use lettuce as top bun.

@shanev
shanev / NYC_coffee_laptop
Created January 25, 2012 21:47
NYC places to work
1) Think Coffee
2) Grounded
3) ACE hotel lobby
4) library near Bryant park
import UIKit
print(DerivedViewController.self)
// The following is required because there's an impedence mismatch between
// `CommandLine` and `UIApplicationMain` <rdar://problem/25693546>.
let argv = UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(
to: UnsafeMutablePointer<Int8>.self,
capacity: Int(CommandLine.argc)
)
import UIKit
public class ViewController<T>: UIViewController {
var viewModel: T!
override public func viewDidLoad() {
super.viewDidLoad()
assertViewModel()
}
}