Skip to content

Instantly share code, notes, and snippets.

/*
---
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
...
*/
@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'
<div class="datetime">
<span>Sept</span>
<span>25</span>
<span>11:30 <strong>AM</strong> <span></span></span>
</div>
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);
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;
source :rubygems
gem 'bubble-wrap'
gem 'motion-cocoapods'
gem 'nano-store'
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('')
# USER.boldfaced.net
constraints(Subdomain) do
get 'work/:id' => 'work_items#show', as: :user_work
get '' => 'users#profile', as: :user_profile
end
<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">
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css" media="screen">
* {
margin: 0;
padding: 0;
}
</style>