Skip to content

Instantly share code, notes, and snippets.

<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-precomposed-72.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-precomposed-114.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-precomposed-144.png">
# USER.boldfaced.net
constraints(Subdomain) do
get 'work/:id' => 'work_items#show', as: :user_work
get '' => 'users#profile', as: :user_profile
end
VOWELS = %w[a e o u]
CONS = ('a'..'z').to_a - VOWELS
len = 5
phrase = (1..len).inject([]) {|prod,i|
prod << (i.even? ? VOWELS.sample : CONS.sample)
}.join('')
source :rubygems
gem 'bubble-wrap'
gem 'motion-cocoapods'
gem 'nano-store'
var playSingleChime = function()
{
var context = new webkitAudioContext(),
gain = context.createGainNode(),
osc = context.createOscillator();
osc.connect(gain);
gain.connect(context.destination);
osc.frequency.value = 1000.0;
var context = new webkitAudioContext(),
oscillator = context.createOscillator();
oscillator.type = oscillator.SQUARE;
oscillator.frequency.value = 1000;
oscillator.connect(context.destination);
oscillator.noteOn && oscillator.noteOn(0);
setTimeout('oscillator.disconnect()', 500);
<div class="datetime">
<span>Sept</span>
<span>25</span>
<span>11:30 <strong>AM</strong> <span></span></span>
</div>
@kylebragger
kylebragger / force-ssl.rb
Created November 10, 2011 06:02 — forked from mrrooijen/force-ssl.rb
Secure with SSL (Subdomain and Protocol) in Rails 3.1
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :secure_with_ssl
private
def secure_with_ssl
if request.subdomain != 'secure' or request.protocol != 'https'
redirect_to :subdomain => 'secure', :protocol => 'https'
/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/
/*
This would have to be modified obviously, but it proves the concept.
*/
$('.code').hide()
.clone()
.appendTo('html')
.css('position', 'absolute')
.css('top', '2.5%')
.css('left', '2.5%')
.css('width', '95%')