Skip to content

Instantly share code, notes, and snippets.

@bromanko
bromanko / symlink-deps.js
Created January 2, 2015 20:35
Symlink Dependencies as Virtual Node modules
@bromanko
bromanko / gist:1520474
Created December 26, 2011 03:24
GCD Implementation
- (AQGridViewCell *)gridView:(AQGridView *)gridView cellForItemAtIndex:(NSUInteger)index {
switch ([self numberOfItemsInGridView:gridView] - index) {
case 2:
// Favorites cell
return [TopicListViewController favoritesCell];
case 1:
// Add cell
return [TopicListViewController addCell];
default: {
// Topic cells
@bromanko
bromanko / clone-rackspace-container.js
Created February 20, 2012 16:28
Cloudfiles Copy Container
var cloudfiles = require('cloudfiles');
request = require('request');
// CloudFiles client configuration
var configCloudFiles = {
auth: {
username: '',
apiKey: '',
host: 'auth.api.rackspacecloud.com'
}
** [out :: dashboard.onpremisewine.com] config/schedule.rb:50:in `block in initialize'
** [out :: dashboard.onpremisewine.com] : undefined local variable or method `send_broken_pos_notifications' for #<Whenever::JobList:0x00000001a35f60> (NameError)
** [out :: dashboard.onpremisewine.com] from /www/tastevin-web/shared/bundle/ruby/1.9.1/gems/whenever-0.7.3/lib/whenever/job_list.rb:38:in `every'
** [out :: dashboard.onpremisewine.com] from config/schedule.rb:49:in `initialize'
** [out :: dashboard.onpremisewine.com] from /www/tastevin-web/shared/bundle/ruby/1.9.1/gems/whenever-0.7.3/lib/whenever/job_list.rb:19:in `instance_eval'
** [out :: dashboard.onpremisewine.com] from /www/tastevin-web/shared/bundle/ruby/1.9.1/gems/whenever-0.7.3/lib/whenever/job_list.rb:19:in `initialize'
** [out :: dashboard.onpremisewine.com] from /www/tastevin-web/shared/bundle/ruby/1.9.1/gems/whenever-0.7.3/lib/whenever.rb:15:in `new'
** [out :: dashboard.onpremisewine.com] from /www/tastevin-web/shared/bundle/ruby/1.9.1/gems/
#!/usr/bin/env node
require('coffee-script');
var env = require('./config/env')
, restify = require('restify')
, repl = require('repl').start()
, util = require('util');
repl.context.inspect = util.inspect;
@bromanko
bromanko / gist:2695108
Created May 14, 2012 17:07
ARC or Not
#if !__has_feature(objc_arc)
#define NonatomicRetainedSetToFrom(a, b) do{if(a!=b){[a release];a=[b retain];}}while(0)
#define NonatomicCopySetToFrom(a, b) do{if(a!=b){[a release];a=[b copy];}}while(0)
#else
#define NonatomicRetainedSetToFrom(a, b) do{if(a!=b){a=b;}}while(0)
#define NonatomicCopySetToFrom(a, b) do{if(a!=b){a=[b copy];}}while(0)
#endif
@bromanko
bromanko / test.js
Created July 24, 2012 18:05
node restify HTTPClient multipart form upload
it('should return a BadRequestError if photo is not sent on post to /users/me/photos', function(done) {
var options = {
path: '/users/me/photos',
headers: {
'Content-Type': 'multipart/form-data; boundary=Boundary+0xAbCdEfGbOuNdArY'
}
};
common.httpClient(testUser).post(options, function(err, req) {
req.on('result', function(err, res) {
@bromanko
bromanko / UIImage+Retina4.h
Created September 26, 2012 14:55 — forked from bstahlhood/UIImage+Retina4.h
Swizzled UIImage imageNamed for iPhone 5
//
// UIImage+Retina4.h
// StunOMatic
//
// Created by Benjamin Stahlhood on 9/12/12.
// Copyright (c) 2012 DS Media Labs. All rights reserved.
//
#import <UIKit/UIKit.h>
@bromanko
bromanko / Local SSL.md
Last active April 1, 2016 15:53 — forked from jonathantneal/README.md
Local SSL websites on Mac OSX

Local SSL websites on Mac OSX

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on Mac OSX Yosemite.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward edit to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"

Please publicly post the following Gist, and name it keybase.md

Keybase proof

I hereby claim:

  • I am bromanko on github.
  • I am bromanko (https://keybase.io/bromanko) on keybase.
  • I have a public key ASC9xLX6pFZXnQ0858HBMyeCl6kIoPMOHEWJ95hqr59JFgo