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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 hasFlash = false; | |
try { | |
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
if (fo) { | |
hasFlash = true; | |
} | |
} catch (e) { | |
if (navigator.mimeTypes | |
&& navigator.mimeTypes['application/x-shockwave-flash'] != undefined | |
&& navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { |
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
/** | |
* Duoshuo Comments Style for Amaze UI | |
* by Minwe | |
*/ | |
#ds-thread #ds-reset .ds-meta { | |
border-bottom-color: #eee; | |
} | |
/* Like button */ |
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
# sets the proxy cache path location, max size 2g | |
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g; | |
# transfers the `Host` header to the backend | |
proxy_set_header Host $host; | |
# uses the defined STATIC cache zone | |
proxy_cache STATIC; | |
# cache 200 10 minutes, 404 1 minute, others status codes not cached |
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 gulp = require('gulp'), | |
runSequence = require('run-sequence'), | |
watch = require('gulp-watch'), | |
concat = require('gulp-concat'), | |
imagemin = require('gulp-imagemin'), | |
less = require('gulp-less'), | |
prefixer = require('gulp-autoprefixer'), | |
clean = require('gulp-clean'), | |
template = require('gulp-template'); |
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 blob = require('azure').createBlobService() | |
, fs = require('fs') | |
, Q = require('q') | |
var options = { publicAccessLevel: 'blob' } | |
// With Q | |
var fsLstat = Q.nbind(fs.lstat, fs); | |
var getContainer = Q.nbind(blob.createContainerIfNotExists, blob); | |
var streamFile = Q.nbind(blob.createBlockBlobFromStream, blob); |
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> | |
<head> | |
<!-- Run in full-screen mode. --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Make the status bar black with white text. --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.minwe.mongod</string> | |
<key>Program</key> | |
<string>/usr/local/mongodb/bin/mongod</string> | |
<key>ProgramArguments</key> | |
<array> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.lextang.shadowsocks</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/node</string> | |
<string>/Users/Lex/Dropbox/shadowsocks-nodejs/local.js</string> |
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
/** | |
* impress.js | |
* | |
* impress.js is a presentation tool based on the power of CSS3 transforms and transitions | |
* in modern browsers and inspired by the idea behind prezi.com. | |
* | |
* | |
* Copyright 2011-2012 Bartek Szopka (@bartaz) | |
* | |
* Released under the MIT and GPL Licenses. |