Skip to content

Instantly share code, notes, and snippets.

View davejachimiak's full-sized avatar

Dave Jachimiak davejachimiak

View GitHub Profile
anonymous
anonymous / gist:2879253
Created June 6, 2012 01:20
validation of type column
module Types
FULL_TIME_ONSITE = 'Full Time - On-Site'
FULL_TIME_REMOTE = 'Full Time - Remote'
PART_TIME = 'Part-Time'
CONTRACT = 'Contract'
UNKNOWN = 'unknown'
end
JOB_POSTING_TYPES = [ Types::FULL_TIME_ONSITE, Types::FULL_TIME_REMOTE, Types::PART_TIME, Types::CONTRACT, Types::UNKNOWN ]
validates :job_posting_type, :inclusion => { :in => JOB_POSTING_TYPES, :message => "%{value} is not a valid job posting type value" }
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@ohanhi
ohanhi / joy-of-composition.md
Last active February 3, 2021 18:14
The Joy of Composition - Why stateless rendering is pure bliss

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

The Joy of Composition

Why stateless rendering is pure bliss

React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views

@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net