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
//get first part of current url, without hash | |
var base_path = window.location.href.split("#")[0]; | |
var real_id = 0; | |
var current_page; | |
;(function($) { | |
//create new sammy app | |
var app = new Sammy.Application(function() { | |
with(this) { | |
//corresponds to routes like #/slide/1 | |
get('#/slide/:page_id', function() { with(this) { |
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> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>post-it-realistic-drop-shaddow</title> | |
<meta name="preview" content="http://victorstan.com/css-effects/post-it-realistic-drop-shadow.html"> | |
<style type="text/css" media="screen"> | |
body { | |
background-color:#ddd; | |
} | |
#box { |
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
// Mongo shell | |
// Let's say you need to have a sequential id; here, it is '_i' | |
// the other entry is a reference to another 'post' containing its natural MongoDB ObjectId | |
db.your_collection_name.insert({"_i":new NumberLong(1), "post_id":"4cf68ff393eae6291e00003a"}); | |
// let's make sure we add an index that is defined as unique | |
db.your_collection_name.ensureIndex({"_i":1}, {unique:true}); | |
// TODO: still need to provide the methodology used to auto-increment the unique field '_i' |
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
################################# | |
Scaffold generator options: | |
Format: [name, type] | |
################################# | |
# Active Record supports the following types: | |
:primary_key | |
:string | |
:text |
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
!default_rounded_amount ||= 5px | |
// Round corner at position by amount. | |
// values for position: "top-left", "top-right", "bottom-left", "bottom-right" | |
=round-corner(!position, !amount = !default_rounded_amount) | |
border-#{!position}-radius= !amount | |
-moz-border-#{!position}-radius= !amount | |
-webkit-border-#{!position}-radius= !amount | |
// Round left corners by amount |
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
/\A\(?[-. ]?\d{3}[-. ]?\)?[-. ]?\d{3}[-. ]?\d{4}\Z/ | |
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
// minimal reset with html5 | |
// provided by: http://snipt.net/catcubed/minimal-html5-css-reset-for-sass/ | |
* | |
vertical-align: baseline | |
font-family: inherit | |
font-style: inherit | |
font-size: 100% | |
border: none | |
padding: 0 |
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
// Requires jQuery | |
// FLASH NOTICE ANIMATION | |
$("#flash_notice").delay(5000).fadeOut("slow"); | |
$("#flash_alert").delay(5000).fadeOut("slow"); | |
$("#flash_error").delay(5000).fadeOut("slow"); |
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
#flash_notice, #flash_alert, #flash_error | |
z-index: 999 | |
@include round-corners(10px) | |
@include glow-disk(rgba(0,0,0,0.5)) | |
position: absolute | |
right: 20px | |
height: 40px | |
line-height: 40px | |
background: rgba(0,0,0,0.8) | |
color: white |
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
#flash_notice, #flash_alert, #flash_error { | |
z-index: 999; | |
border-radius: 10px; | |
-moz-border-radius: 10px; | |
-webkit-border-radius: 10px; | |
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); | |
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); | |
-webkit-box-shadow: 0 0 40px rgba(0, 0, 0, 0.5); | |
position: absolute; | |
right: 20px; |