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
<!-- formstack submit redirect to same page with #success on the end --> | |
<!-- This goes at the top of the content --> | |
<div class="alert-box success radius" data-alert="" id="success" style="display: none;">Success! Thank you for registering for Open House! <a class="close" href="#">×</a></div> | |
<!-- this goes anywhere --> | |
<!--#protect | |
<script type="text/javascript"> | |
if(window.location.hash) { |
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
<!-- ZENDESK WIDGET --> | |
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.6/zenbox.js"></script> | |
<style type="text/css" media="screen, projection"> | |
@import url(//assets.zendesk.com/external/zenbox/v2.6/zenbox.css); | |
</style> | |
<script type="text/javascript"> | |
if (typeof(Zenbox) !== "undefined") { | |
Zenbox.init({ | |
dropboxID: "20265836", | |
url: "https://columbiachi.zendesk.com", |
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
// We all know how to use mixins, right? | |
@mixin kung { | |
background: green; | |
color: yellow; | |
} | |
@mixin foo { | |
background: orange; | |
color: red; |
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
MongoDB provides a Javascript shell. But Javascript is no fun without underscore.js | |
Turned out its straight forward to use underscore.js while scripting mongodb. | |
Here are the steps. | |
1) Use underscore to write your db script file (say my_commands.js) | |
E.g: _.each(db.dbname.find().toArray(), function(itm) { ... }) |
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> | |
<html> | |
<head> | |
<title>Number Test</title> | |
<style> | |
tr { | |
background: #ddd; | |
} | |
tr:nth-child(odd) { |
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
/* | |
* Function to calculate the absolute difference in days, months and years between 2 days taking into account variable month lengths and leap years | |
* It ignores any time component (ie hours, minutes and seconds) | |
* | |
*/ | |
function dateDiff(dt1, dt2) | |
{ | |
/* | |
* setup 'empty' return object | |
*/ |