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
/* horizontal centering | |
method 1; negative margin | |
h1 { | |
width: 350px; | |
position: relative; | |
left: 50%; | |
margin-left: -175px; | |
}*/ |
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
/* vertical and horizontal centering | |
method 1: absolute position + negative margin | |
h1 { | |
position: absolute; | |
width: 350px; | |
height: 50px; | |
left: 50%; | |
top: 50%; |
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
h3 { | |
font-size: 15px; | |
color: #333; | |
font-family: 'arial'; | |
} | |
ul { | |
list-style: none; | |
padding-left: 0px; | |
width: 600px; | |
} |
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
#!/usr/bin/env bash | |
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
mkdir vim && tar xzvf vim.tar.gz -C vim | |
export PATH=$PATH:/app/vim/bin |
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 tableToDiv(html) { | |
return html.replace(/<(\/?)(table|thead|tbody|tfoot|th|td|tr)/gi, '<$1div data-original-tag="$2"'); | |
} |
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
// save | |
require('fs').writeFile("/Users/guanxiongding/Desktop/test.html", body, function() {}); | |
// load | |
body = require('fs').readFileSync('/Users/guanxiongding/Desktop/test.html', {encoding: 'utf8'}) | |
$ = require('bb_platform/node_modules/cheerio').load(body); |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="HandheldFriendly" content="True"> | |
<meta name="MobileOptimized" content="320"> | |
<meta http-equiv="cleartype" content="on"> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width"> | |
<title>Fastclick test</title> | |
<script> |
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
// ------------------------------------------------------------------------ | |
// In app.js (using connect-assets for assets pipeline) | |
// ------------------------------------------------------------------------ | |
app.use(require('./style-watcher.js')(app)); | |
// ------------------------------------------------------------------------ |
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
// support if, liquid style filter | |
var orderInfoTemplate = '\ | |
<div class="section">\ | |
<h2>Order Status</h2>\ | |
<div class="order-number">Order Number: <strong>{order_number}</strong></div>\ | |
<div class="order-status">Status: <strong>{fulfillments[0].status}</strong></div>\ | |
<div class="tracking-number">Tracking Number: {#if fulfillments[0].tracking_number}<strong><a href="{fulfillments[0].tracking_url}">{fulfillments[0].tracking_number}</a></strong> by {fulfillments[0].tracking_company}{/if}</div>\ | |
</div>\ | |
<div class="section">\ |
OlderNewer