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
body { | |
white-space: pre; | |
font-family: Bitstream Vera Sans Mono, monospace; | |
font-size: 13px; | |
background: #1D1D1D; | |
color: #FFFFFF; | |
} | |
body li, body div { | |
border: 1px solid transparent; |
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
<!-- | |
This is the Rails partial (include) that has the HTML fields. | |
You pass in an id_prefix and name_prefix, to keep the form elements unique. | |
And optionally pass in a set_date variable to have the default date. | |
--> | |
<span data-action="timechanger"> | |
<!-- Attempt to use native date picker. --> | |
<input class="datefield" data-timechangerdate="true" type="date" id="<%= id_prefix %>_date" name="<%= name_prefix %>_date" value="<%= set_date.to_s(:sitemap_date) if set_date.present? %>" /> |
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
editor.font=Bitstream Vera Sans Mono,plain,12 | |
editor.antialias=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
function add() { | |
var total = 0, | |
max_decimal = 0; | |
for (var i=0,l=arguments.length;i<l;i++) { | |
var num = parseFloat( arguments[i] ), | |
arr = ( num + '' ).split('.'), | |
dec = ( arr[1] == undefined ? 0 : arr[1].length ); |
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 formatTime( seconds ) { | |
seconds = Math.round( seconds ); | |
var hours = 0, | |
minutes = 0; | |
while (seconds >= 3600) { | |
hours += 1; | |
seconds -= 3600; | |
} | |
while (seconds >= 60) { | |
minutes += 1; |
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
# Caveman | |
def seconds_to_extended(seconds) | |
hours = 0 | |
minutes = 0 | |
while seconds >= 3600 | |
hours += 1 | |
seconds -= 3600 | |
end | |
while seconds >= 60 | |
minutes += 1 |
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
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, cite, code, | |
del, dfn, em, img, ins, kbd, q, samp, | |
strike, strong, sub, sup, var, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td { | |
margin: 0; | |
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
@mixin border_radius($radius: 10px) { | |
-webkit-border-radius: $radius; | |
-khtml-border-radius: $radius; | |
-moz-border-radius: $radius; | |
-ms-border-radius: $radius; | |
-o-border-radius: $radius; | |
border-radius: $radius; | |
} |
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
/* | |
This comes directly from John Resig's MicroTemplating, but with {%= %} instead of <%= %> for the dynamic sections. | |
http://ejohn.org/blog/javascript-micro-templating/ | |
This lets you use just natural Javascript, along with whatever JS library you're using, and can be inside of a Rails erb template, or whatever. | |
Used with a template inside the HTML of the page: | |
<script type="text/html" id="user_tmpl"> |