This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<script type="text/javascript"> | |
// <![CDATA[ | |
/* | |
App Data | |
Changeable | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
str = Benchmark.measure do | |
10_000_000.times do | |
"test" | |
end | |
end.total | |
sym = Benchmark.measure do | |
10_000_000.times do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
address = EasyPost::Address.create( | |
:name => 'Test Person', | |
:street1 => '15 TANGUAY AVENUE', | |
:city => 'Nashua', | |
:state => 'NH', | |
:zip => '03062', | |
:country => 'US', | |
:phone => '201-273-8374', | |
:residential => false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The GraphicsMagick action, dependent on the `gm` command, is able to perform | |
# any number of GraphicsMagick conversions on an image passed in as an input. | |
# The options hash should specify the +name+ for the particular step (which is | |
# appended to the resulting image filename) the +command+ (eg. convert, mogrify), | |
# the +options+ (to the command, eg. -shadow -blur), and the +extension+ which | |
# will determine the resulting image type. Optionally, you may also specify | |
# +input+ as the name of a previous step; doing this will use the result of | |
# that step as the source image, otherwise each step uses the original image | |
# as its source. | |
class GraphicsMagick < CloudCrowd::Action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
source :gemcutter | |
source 'http://gems.github.com' | |
# Rails 2.x style. | |
group :rails do | |
gem 'rails', '~> 2.3.5', :require => nil | |
gem 'builder', '~> 2.1.2' | |
gem 'memcache-client', '>= 1.7.4', :require => nil | |
gem 'tzinfo', '~> 0.3.12' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
# - a browser with WebSocket support | |
# | |
# Usage: | |
# ruby redis_pubsub_demo.rb | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB = { | |
:redis => SITE_REDIS, | |
:geo => GEO | |
} | |
SITES = DB[:redis].smembers("sites").inject({}) do |sum, site| | |
sum[site] = JSON.parse(DB[:redis]["site:#{site}"]) | |
sum | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FCG | |
module Client | |
module Comment | |
# sort attributes | |
ATTRIBUTES = [:site, :record, :body, :body_as_html, :deleted, :flagged_by, :depth, :path, :parent_id, :displayed_name, :user_id] | |
module ClassMethods | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommentsController < ApplicationController | |
before_filter :require_user | |
def index | |
@comments = Comment.all | |
end | |
def new | |
end |
OlderNewer