Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
// Google Analytics code to work with Turbolniks 5 | |
this.GoogleAnalytics = (function() { | |
function GoogleAnalytics() {} | |
GoogleAnalytics.load = function() { | |
var firstScript, ga; | |
window._gaq = []; | |
window._gaq.push(["_setAccount", GoogleAnalytics.analyticsId()]); | |
window._gaq.push(['_setAllowAnchor', true]); |
// 使用 userAgent 判断是否微信内置浏览器 | |
if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) { | |
return true; | |
} |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
#!/bin/bash | |
# before you can use this, you need to run (as root): | |
# git clone https://github.com/tt/stack-images.git /root/stack-images | |
# git clone https://github.com/gliderlabs/herokuish.git /root/herokuish | |
# First, we need to get our base ubuntu images up to date | |
docker pull ubuntu-debootstrap:14.04 | |
docker pull ubuntu:trusty # for postgresql |
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
stats = Sidekiq::Stats.new | |
stats.queues | |
stats.enqueued | |
stats.processed | |
stats.failed |
#!/usr/bin/env python | |
# update system | |
apt-get -y -qq --force-yes update | |
# install needed system deps | |
apt-get -y -qq --force-yes install \ | |
python-setuptools \ | |
build-essential \ | |
wget \ |
#!/bin/bash | |
echo "--------------------------------------------------------------------------------------" | |
echo "This script builds a full operating system with debootstrap and chroot" | |
echo "To use this script, please mount an empty partition or alternate disk" | |
echo "" | |
echo "If you are using btrfs, and using subvolumes, mount the root subvolume explicity" | |
echo "Example: mount /dev/sdb1 /media/bootstrap -o subvol=@" | |
echo "Failure to do this will cause the script to break. It needs the root directory" | |
echo "" | |
echo "The script is specifically built for Ubuntu" |
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
// quando clicco su enterfullscreen: | |
// vai in fullscreen | |
// all'entrata in fullscreen: | |
// mostra pulsante exitfullscreen | |
// nascondi header e footer | |
// quando clicco su exitfullscreen: | |
// esci da fullscreen |