Skip to content

Instantly share code, notes, and snippets.

View payalord's full-sized avatar
🎯
Focusing

payalord

🎯
Focusing
View GitHub Profile
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@davidselassie
davidselassie / uncertain_rounding.js
Created October 5, 2012 07:18
Javascript rounding to specific number of significant figures or an uncertainty.
var roundAway = function(x) {
// Rounds a number to the next integer away from 0.
//
// Args:
// x - Number to round.
// Returns:
// rounded - Next integer from x away from 0.
if (x >= 0) {
return Math.ceil(x);