Skip to content

Instantly share code, notes, and snippets.

db:
image: postgres
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
links:
@csexton
csexton / Dockerfile
Created February 16, 2016 16:46
Getting started with Rails and Docker
FROM ruby:2.2.3
RUN apt-get update -qq && apt-get install -y build-essential
# for postgres
RUN apt-get install -y libpq-dev
# for nokogiri
RUN apt-get install -y libxml2-dev libxslt1-dev

tl;dr - Coder Night is to practice development. You write code in pairs or individually and submit the code to me (sean @ arlingtonruby.org). I post an anonymized repo and you have a few days to look at all the solutions before a friendly night of code review.

THE PROBLEM SET: http://www.puzzlenode.com/puzzles/11-hitting-rock-bottom

SUBMISSIONS DUE: Friday July 18th at 11:59pm.

Coder Night Coder Night is a chance to practice your coding skills outside your work environment or help get started if you are just learning. Coder Night provides an ego-free environment to perform deliberate coding practice and to receive critical but judgement free feedback on your progress.

% docker run -d -p 8000:80 --name webserver kitematic/hello-world-nginx
Unable to find image 'kitematic/hello-world-nginx:latest' locally
Pulling repository docker.io/kitematic/hello-world-nginx
Network timed out while trying to connect to https://index.docker.io/v1/repositories/kitematic/hello-world-nginx/images. You may want to check your internet connection or if you are behind a proxy.
func tableView(tableView: NSTableView, viewForTableColumn tableColumn: NSTableColumn?, row: Int) -> NSView? {
let cellview = tableView.makeViewWithIdentifier("accountCell", owner: self) as! AccountTableCellView
cellview.nameField!.stringValue = self.objects.objectAtIndex(row) as! String
cellview.typeField!.stringValue = self.objects.objectAtIndex(row) as! String
return cellview
}
// ------
on handle_string(theString)
if theString is not "" then
tell application "OmniFocus" to parse tasks into default document with transport text theString
else
display notification "No string to work with." with title "LaunchBar" subtitle "Add to OmniFocus"
end if
end handle_string
@csexton
csexton / f.rb
Created October 10, 2015 15:40
class Foo
def initialize
ObjectSpace.define_finalizer(self, proc {|id| puts "Finalizer one on #{id}" })
end
end
f = Foo.new
f = nil
@csexton
csexton / bhos.md
Created September 23, 2015 23:21
Brief History of Swapdrive

Swapdrive: A Brief History

Chapter 1

In the beginning the drive was with out ''BR'' nor ''Whale'', and there was Roland and Marc, and nothing else. Roland said to Marc, go forth to your basement and bootith up swap pro the first and let there be Swapdrive.

And it was good.

Chapter 4: Exodus

module Controllers
module JsonApiCompatible
module MungeAndMirror
# Wraps the data root in an Array, if it is not already an Array. This
# will not wrap the value if the resource root is not present.
def munge_resource_root!
return unless params.key?(resource_type)