I hereby claim:
- I am jnf on github.
- I am jnf (https://keybase.io/jnf) on keybase.
- I have a public key whose fingerprint is 8913 A2F3 8073 86C9 F367 3752 148A E504 F827 DA56
To claim this, I am signing this object:
class Player | |
def play_turn(warrior) | |
@warrior = warrior | |
@preferred_direction = @warrior.direction_of_stairs | |
wat_do? | |
end | |
protected | |
- x = 7 | |
.div1 | |
.div2 | |
.div4 | |
- if x == 4 | |
Totes a four. | |
- else | |
Prolly not a four. | |
.div3 | |
A third div, nested in div2. |
I hereby claim:
To claim this, I am signing this object:
Open Source & Feelings (OS&F) is a new technology conference focused on providing tools and support for people seeking to implement and improve technology %w(access tools education).sample
in their communities.
We're early in the planning process, but some language describes our mission as:
Open Source & Feelings is a two-day event exploring the Humanities & Arts through the lens of open source technology, those tools and products we use to richly experience & interact with each other, our communities, and the world.
One of our most immediate needs is visual identity for the project. The goal of this document is to describe our need well enough to jump-start conversation. Given that this is the first year, we have no existing brand materials for you to reference.
def mergesort(a) | |
# if the array size is 0|1 then the list is considered sorted, return sorted | |
return a if a.length <= 1 | |
# split the list in half | |
left, right = split_array a | |
# merge sort each half | |
sorted_left = mergesort left | |
sorted_right = mergesort right |
//sometimes, you just want the copy inside an element. | |
function $T(element) { | |
var t = $(element); | |
return t == null ? t : t.innerHTML.gsub(/<\/?[^>]*>/, ''); | |
} | |
//is fetching the innerHTML bad form? Most of the time, yeah. | |
function $M(element) { | |
var m = $(element); | |
return m == null ? m : m.innerHTML; |
/* | |
* @author jnf http://github.com/jnf | |
* other_select, when attached to a select box, pops a sibling input field with similar | |
* attributes. Use it to record user input that falls outside the options provided in a | |
* select box. | |
*/ | |
$.fn.other_select = function(options) { | |
var defaults = { | |
speed: 'normal', //rate at which the alternate input field appears/disappears | |
nameSuffix: '_other', //suffix appended to the alternate input's name attribute |
;(function($) { | |
var interpolate = function (source, target, shift) { | |
return (source + (target - source) * shift); | |
}; | |
var easing = function (position) { | |
return (-Math.cos(position * Math.PI) / 2) + .5; | |
}; | |
$.scrollBoth = function(XY, duration, easingF) { |
class Story < ActiveRecord::Base | |
... | |
before_save :setColor | |
... | |
private | |
def setColor |
namespace :db do | |
require 'uri' | |
desc "Uses heroku:config for APP to forcefully create ~/.pgpass" | |
task :create_pgpass do | |
app = ENV['APP'] || 'whatever-your-default-app-is' | |
uri = URI(`heroku config:get DATABASE_URL -a #{app}`) | |
entry = "*:5432:#{uri.path.gsub /\//, ''}:#{uri.user}:#{uri.password}" | |
`echo '#{entry}' > ~/.pgpass; chmod 0600 ~/.pgpass` | |
end |