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 | |
head | |
title Responsive Test | |
<style>body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }.wrapper { width: 6000px; }.frame { float: left; }h2 { margin: 0 0 5px 0; }iframe { margin: 0 20px 20px 0; border: 1px solid #666; }</style> | |
body | |
- sizes = [ [240, 320, 'mobile'], [320, 480, 'mobile'], [480, 640, 'small tablet'], [768, 1024, 'tablet - portrait'], [1024, 768, 'tablet - landscape'], [1200, 800, 'desktop'], ]; | |
.wrapper | |
each item in sizes | |
.frame |
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 script should be inline | |
(function(win, doc, seajs) { | |
var $ = function(id) { | |
if (typeof id == 'string') return document.getElementById(id); | |
return id; | |
}; | |
$.uuid = 0; | |
/** | |
* @param {array} funs 需要执行的函数,一个文本数组. |
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
var conf = central.conf; | |
var reg_val = /#{([^}]+)}/g; | |
module.exports = function(app) { | |
app.helpers({ | |
DEBUG: conf.debug | |
}); | |
app.dynamicHelpers({ | |
// inline static | |
istatic: function(req, res) { |
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() { | |
var canNative = (function() { | |
var elem = document.createElement('input'); | |
return 'placeholder' in elem; | |
})(); | |
$.fn.placeholder = function(text, cls, noNative) { | |
var self = this; | |
text = text || ''; | |
cls = cls || 'blur'; | |
if (!noNative && canNative) { |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
#... 加入你的启动脚本中 | |
su www -c "/srv/nodejs/nogo.sh weixin halt reboot" | |
su www -c "/srv/nodejs/nogo.sh loudlaw halt reboot" |
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
#!/bin/bash | |
# Paste at Pastebin.com using command line (browsers are slow, right?) | |
# coder : Anil Dewani | |
# date : Novemeber 7, 2010 | |
#help function | |
howto() | |
{ | |
echo "\ | |
Pastebin.com Bash 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
# -*- encoding:utf-8 | |
""" | |
(c) https://gist.github.com/577116 | |
HTML5 microdata parser for python 2.x/3.x | |
- it requires lxml | |
- microdata specification: http://dev.w3.org/html5/md/ | |
""" | |
try: from urllib.parse import urljoin |
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
#!/bin/bash | |
logfiles="/mfs/log/scribe/xxxxx/*/*_current" | |
TAB="$(printf '\t')" | |
for f in $logfiles; do | |
while IFS=$TAB; read -r SITE USER_ID CONTENT EXTRA UA COOKIE; do | |
echo "[$SITE] $USER_ID" | |
echo "-----------------" | |
echo -e "$CONTENT" |
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
<? | |
/*by qiuchi @ 2010-11-03 */ | |
$uri = str_replace('index.php', '', $_SERVER["REQUEST_URI"]); | |
//echo $uri . "\n\n"; | |
if ( !strpos($uri, '??') ) { | |
include_once 'fetch.php'; | |
exit; | |
} |
OlderNewer