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
<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |
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
$default_rounded_amount: 5px | |
// Round corner at position by amount. | |
@mixin round-corner($position, $amount: $default_rounded_amount) | |
border-#{$position}-radius: $amount | |
-webkit-border-#{$position}-radius: $amount | |
@mixin round-corner-mozilla($position, $amount: $default_rounded_amount) | |
-moz-border-radius-#{$position}: $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
// 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 |