Dependencies managed with Bower:
npm install -g bower
bower install
...Then open up index.html in a browser.
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
Dependencies managed with Bower:
npm install -g bower
bower install
...Then open up index.html in a browser.
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
# Change YOUR_TOKEN to your prerender token | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/your/root; | |
index index.html; |
(function(userCustom, document, localStorage) { | |
userCustom.onReady = function() { | |
var styles = []; | |
styles.push('.trans-mode{width:50%!important;margin:0!important;}'); | |
styles.push('p,h1,h2,h3,h4,h5,h6,li{position:relative;}'); | |
styles.push('.trans-mode .zh{display:block;position:absolute;top:0;right:0;width:98%;margin-right: -100%;font-size:0.8em;font-family:"微软雅黑"}'); | |
styles.push('.trans-mode pre,.trans-mode blockquote{width: 200%;}'); | |
styles.push('.trans-mode blockquote p{width: 46%;}'); |
#!/usr/bin/python | |
# simplified from msocks5.py @ https://github.com/felix021/ssocks5 | |
import sys | |
import signal | |
try: | |
import gevent |
.timeline { | |
list-style: none; | |
padding: 20px 0 20px; | |
position: relative; | |
} | |
.timeline:before { | |
top: 0; | |
bottom: 0; | |
position: absolute; |
#!/usr/bin/env bash | |
# Configurable variables | |
database='vagrant' | |
username='vagrant' | |
password='vagrant' | |
echo '' | |
echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' | |
echo ' Bootstrapping Ubuntu Precise 32bit for Laravel 4' |