# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
<!doctype html> | |
<html ng-app="project"> | |
<head> | |
<title>Angular: Service example</title> | |
<script src="http://code.angularjs.org/angular-1.0.1.js"></script> | |
<script> | |
var projectModule = angular.module('project',[]); | |
projectModule.factory('theService', function() { | |
return { |
require 'sinatra/base' | |
module Sinatra | |
module Mount | |
def mount(app, route="/#{app.name.downcase}") | |
before "#{route}*" do | |
halt app.call( | |
env.merge( | |
'SCRIPT_NAME' => route.split('/').last, |
// Maintain ratio mixin. Great for responsive grids, or videos. | |
// https://gist.github.com/brianmcallister/2932463 | |
// | |
// $ratio - Ratio the element needs to maintain. | |
// | |
// Examples | |
// | |
// // A 16:9 ratio would look like this: | |
// .element { | |
// @include maintain-ratio(16 9); |
/** | |
* Like, basically PERFECT scrollbars | |
*/ | |
/* | |
It's pure CSS. | |
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars... | |
this has no fade-out effect. | |
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting. |
module Sinatra | |
module Mount | |
def mount(app, route="/#{app.name.downcase}") | |
%w{get post put delete patch options}.each do |method| | |
self.send method.to_sym, "#{route}*" do | |
app.call( | |
env.merge!( | |
'SCRIPT_NAME' => route.split('/').last, | |
'PATH_INFO' => params.delete('splat').join('/') |
#!/usr/bin/env bash | |
set -o errtrace | |
set -o errexit | |
facter_version=$1 | |
puppet_version=$2 | |
target_volume=$3 |
@mixin gradient($first, $second) { | |
background-color: $second; | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#{ie-hex-str($first)}', endColorstr='#{ie-hex-str($second)}');"; | |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#{ie-hex-str($first)}', endColorstr='#{ie-hex-str($second)}');; | |
zoom: 1; | |
background: -webkit-gradient(linear, left top, left bottom, from($first), to($second)); | |
background: -moz-linear-gradient(top, $first, $second); | |
} |
AZHU.storage = { | |
save : function(key, jsonData, expirationMin){ | |
if (!Modernizr.localstorage){return false;} | |
var expirationMS = expirationMin * 60 * 1000; | |
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS} | |
localStorage.setItem(key, JSON.stringify(record)); | |
return jsonData; | |
}, | |
load : function(key){ | |
if (!Modernizr.localstorage){return false;} |