Skip to content

Instantly share code, notes, and snippets.

View arielkirkwood's full-sized avatar

Ariel Kirkwood arielkirkwood

View GitHub Profile
@arielkirkwood
arielkirkwood / copying.sh
Created April 28, 2013 21:06
Shell script for Transmission that copies downloaded files to a separate directory (for processing, or syncing via Dropbox or BitTorrent Sync)
#! /bin/bash
# by @neonelectro on github (Ariel Kirkwood)
DEST_DIR="" # put a file path for the copied files in the quotes
NOW=$(date +%Y-%m-%d\ %H:%M:%S)
cd # put the file path to your downloads folder after cd (and the space)
echo "$NOW Copying $TR_TORRENT_NAME to $DEST_DIR" >> $DEST_DIR/copying.log
echo "====================================================" >> $DEST_DIR/copying.log
@arielkirkwood
arielkirkwood / gist:2468729
Created April 23, 2012 03:50
Building a Startup Team

Building a Startup Team

A lot of people have a lot of ideas. People have to figure out which idea they want to commit to. You want to eliminate all of the roadblocks and potential reasons for someone saying 'No'. Address them in order of importance.


Guidelines on finding a co-founder

  1. Get along!
  2. They should be someone who complements you. Figure out what your business needs, and you will have a better idea of who your cofounder should be.
  3. You're more likely to find a co-founder at a conference either on startups/entrepreneurs or at a conference about your market/industry/field
@arielkirkwood
arielkirkwood / gist:2468231
Created April 23, 2012 02:02
Startup Legal 101 Notes

Startup Legal 101

If you're building a million-dollar business, what's a few hundred bucks? (on finding early legal assistance)

LLCs can convert to C corporations pretty easily, but not the other way around.


Protecting Intellectual Property

Locking up IP is important early on

@arielkirkwood
arielkirkwood / gradient.html
Created December 14, 2011 21:28
CSS Vertical Gradient for Erik
<style type="text/css">
body{
background: #93826b; /* Old browsers */
background: -moz-linear-gradient(top, #93826b 0%, #cabda7 100%, #e0eff9 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#93826b), color-stop(100%,#cabda7), color-stop(100%,#e0eff9)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #93826b 0%,#cabda7 100%,#e0eff9 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #93826b 0%,#cabda7 100%,#e0eff9 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #93826b 0%,#cabda7 100%,#e0eff9 100%); /* IE10+ */
background: linear-gradient(top, #93826b 0%,#cabda7 100%,#e0eff9 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#93826b', endColorstr='#e0eff9',GradientType=0 ); /* IE6-9 */
@arielkirkwood
arielkirkwood / gist:999833
Created May 31, 2011 03:55
[plas] creating admin user results in error page
RuntimeError in UsersController#show
Permission code payments.accept does not exist
Rails.root: /Users/arielkirkwood/plas
Application Trace | Framework Trace | Full Trace
app/models/user.rb:62:in `can'
app/controllers/users_controller.rb:31:in `show'
actionpack (3.0.7) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (3.0.7) lib/abstract_controller/base.rb:150:in `process_action'
@arielkirkwood
arielkirkwood / Gemfile
Created May 25, 2011 20:04
[plas] stock rails Gemfile + ffi
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'ffi'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
@arielkirkwood
arielkirkwood / bundleinstallsuccess
Created May 25, 2011 20:03
[plas] Successful bundle install when specifying gem 'ffi' in stock rails Gemfile
n2-194-128:test_site arielkirkwood$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.0)
Using abstract (1.0.0)
Using activesupport (3.0.7)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.7)
Using erubis (2.6.6)
Installing rack (1.2.3)
@arielkirkwood
arielkirkwood / gist:986177
Created May 23, 2011 03:29
[plas] bundle install error, ffi is not compiling correctly?
Installing ffi (1.0.7) with native extensions /Users/arielkirkwood/.rvm/rubies/ruby-head/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/arielkirkwood/.rvm/rubies/ruby-head/bin/ruby extconf.rb
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_thread_has_gvl_p()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile
@arielkirkwood
arielkirkwood / gist:986179
Created May 23, 2011 03:31
[plas] trying to start rails server anyways after botched bundle install
n2-194-128:plas arielkirkwood$ rails s
/Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find ffi-1.0.7 in any of the sources (Bundler::GemNotFound)
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/spec_set.rb:81:in `map!'
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/spec_set.rb:81:in `materialize'
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/definition.rb:90:in `specs'
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/definition.rb:135:in `specs_for'
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/definition.rb:124:in `requested_specs'
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/environment.rb:23:in `requested_specs'
from /Users/arielkirkwood/.rvm/gems/ruby-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:11:in `setup'
from /Users/arielkirkwood
@arielkirkwood
arielkirkwood / gist:986176
Created May 23, 2011 03:27
Result after removing the ffi line from the Ubuntu Natty Gemfile block. Same json issue as gist:986085
n2-194-128:plas arielkirkwood$ rails s
/Users/arielkirkwood/.rvm/gems/ruby-1.9.2-p180@plas/gems/json-1.5.1/lib/json/common.rb:66: [BUG] unknown type 0x22 (0xc given)
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
-- control frame ----------
c:0089 p:---- s:0279 b:0279 l:000278 d:000278 CFUNC :initialize
c:0088 p:---- s:0277 b:0277 l:000276 d:000276 CFUNC :new
c:0087 p:0099 s:0274 b:0272 l:000271 d:000271 METHOD /Users/arielkirkwood/.rvm/gems/ruby-1.9.2-p180@plas/gems/json-1.5.1/lib/json/common.rb:66
c:0086 p:0208 s:0263 b:0262 l:000261 d:000261 CLASS /Users/arielkirkwood/.rvm/gems/ruby-1.9.2-p180@plas/gems/json-1.5.1/lib/json/ext.rb:24
c:0085 p:0011 s:0260 b:0260 l:000259 d:000259 CLASS /Users/arielkirkwood/.rvm/gems/ruby-1.9.2-p180@plas/gems/json-1.5.1/lib/json/ext.rb:6