Skip to content

Instantly share code, notes, and snippets.

project :test => :shoulda, :renderer => :haml, :stylesheet => :sass, :script => :jquery, :orm => :activerecord
#default routes
APP_INIT = <<-APP
get "/" do
"Hello World!"
end
get :about, :map => '/about_us' do
render :haml, "%p This is a sample blog created to demonstrate the power of Padrino!"
# Shouldn't they be colored somehow fancy?
colors = ['red', 'orange', 'yellow', 'green', 'blue', 'purple']
#jQuery comes to the resque
containerWidth = $('#container2').width()
containsrHeight = $('#container2').height()
# Add polygons to a layer
addPolygon = (layer) ->
n = layer.getChildren().length + 1
# Mohamed Fouad - Everything is an idea!
#TODO somthing weird about beign rescue ensure, as it passess faulty code in begin and rescue sections, must dig deeper there...
#TODO Automatic generation of UserID to be supplied to redis
require 'redis'
require "digest/sha2"
module DB
#include DateTime
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@innovationhero
innovationhero / grape_api_sample.rb
Created November 3, 2012 15:21 — forked from yorzi/grape_api_sample.rb
a well documented ruby api based on GrapeAPI.
require 'grape'
module My
class API < Grape::API
prefix 'api'
## params key list
#################################################################################################################
# 1. login
# 2. sign
@innovationhero
innovationhero / index.html
Created October 25, 2012 18:19
A CodePen by InnovationHero.
<!-- http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/ -->
<!-- Header with Navigation -->
<div id="header">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Page Transitions with CSS3</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="" />
@innovationhero
innovationhero / index.html
Created October 22, 2012 09:54
A CodePen by InnovationHero. Complete RedBackground - background fixed, needs to remove some duplicated code from the css
<!-- http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/ -->
<!-- Header with Navigation -->
<div id="header">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Page Transitions with CSS3</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="" />
@innovationhero
innovationhero / index.html
Created October 22, 2012 09:54
A CodePen by InnovationHero. Complete RedBackground - background fixed, needs to remove some duplicated code from the css
<!-- http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/ -->
<!-- Header with Navigation -->
<div id="header">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Page Transitions with CSS3</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="" />
@innovationhero
innovationhero / index.html
Created October 22, 2012 07:31
A CodePen by InnovationHero.
<!-- http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/ -->
<!-- Header with Navigation -->
<div id="header">
<h1>eKoKi.me - everyting is an Idea!</h1>
<a href="#home" ><img src="http://www.acrylic-solid-surface.com/photo/pm472288-square_decorative_grey_translucent_resin_panels_for_bathroom_wall_stone_sheets.jpg" border="2" style="border:2px solid black;max-width:100%;" alt="Photo of Milford Sound in New Zealand!" />
</a> <a href="#portfolio" ><img src="http://www.acrylic-solid-surface.com/photo/pm472288-square_decorative_grey_translucent_resin_panels_for_bathroom_wall_stone_sheets.jpg" border="2" style="border:2px solid black;max-width:100%;" alt="Photo of Milford Sound in New Zealand!" />
</a> <a href="#about" ><img src="http://www.acrylic-solid-surface.com/photo/pm472288-square_decorative_grey_translucent_resin_panels_for_bathroom_wall_stone_sheets.jpg" border="2" style="border:2px solid black;max-width:100%;" alt="Photo of Milford Sound in New Zealand!" />
</a> <a hr
/* http://tympanus.net/codrops/2012/01/30/page-transitions-with-css3/ */
@import url(http://fonts.googleapis.com/css?family=Gloria+Hallelujah);
#header{
position: absolute;
z-index: 2000;
width: 235px;
top: 50px;