a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| setInterval(function() { | |
| console.log([s = [86400000, 3600000, 60000, 1000]][0].map(function(t) { | |
| return ("0" + [(t===s[0] && (remaining = (future - ~~(+new Date()/1000))*1000)), left = ~~(remaining/t), remaining -= left*t][1]).slice(-2); | |
| }).join(':')); | |
| }, [1000, future = +new Date()/1000 + 100000][0]); |
| #!/bin/bash | |
| ############################################################ | |
| # Recursively peruses a directory and converts MKV files | |
| # to MP4 for streaming to Xbox360. | |
| # | |
| # @author: Ticean Bennett | |
| # @url: http://ticean.com | |
| # @see: http://trac.handbrake.fr/wiki/CLIGuide#options | |
| # | |
| # @param file The complete file path. |
| function Track(src, spriteLength, audioLead) { | |
| var track = this, | |
| audio = document.createElement('audio'); | |
| audio.src = src; | |
| audio.autobuffer = true; | |
| audio.load(); | |
| audio.muted = true; // makes no difference on iOS :( | |
| /* This is the magic. Since we can't preload, and loading requires a user's | |
| input. So we bind a touch event to the body, and fingers crossed, the |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| #!/bin/bash | |
| ## v1.0.6 | |
| ## this script will gernerate css stats | |
| ### example output | |
| # CSS STATS | |
| # ---------- | |
| # Floats: 132 |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
These use separate document structures instead of HTML, some are more modular libraries than full editors
| #!/bin/sh | |
| mkdir -pv traefik && cd traefik | |
| printf "version: '2' \n\ | |
| \n\ | |
| services: \n\ | |
| traefik: \n\ | |
| image: traefik \n\ | |
| restart: always \n\ | |
| ports: [ '80:80', '8080:8080' ] \n\ |