(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
class ResumeDownload { | |
private $file; | |
private $name; | |
private $boundary; | |
private $delay = 0; | |
private $size = 0; | |
function __construct($file, $delay = 0) { | |
if (! is_file($file)) { |
.text-xs-left { text-align: left; } | |
.text-xs-right { text-align: right; } | |
.text-xs-center { text-align: center; } | |
.text-xs-justify { text-align: justify; } | |
@media (min-width: @screen-sm-min) { | |
.text-sm-left { text-align: left; } | |
.text-sm-right { text-align: right; } | |
.text-sm-center { text-align: center; } | |
.text-sm-justify { text-align: justify; } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#AND | |
<b:if cond='data:blog.pageType == "index"'> | |
<b:if cond='data:blog.searchQuery'> | |
<!--search_page AND index_page--> | |
</b:if> | |
</b:if> | |
#OR |
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
require(["lib/play-manager"], function(a) { | |
// via http://stackoverflow.com/a/6274381 | |
//+ Jonas Raoni Soares Silva | |
//@ http://jsfromhell.com/array/shuffle [v1.0] | |
function shuf(o) { for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); } | |
shuf(a.source.models); | |
var c = a.getCurrentSound(), p = c ? c.isPaused() : false; | |
a.playNext(); a.playPrev(); // poor man's refresh of current playing song | |
if (p) a.pause(c); // preserve first-run state |
<?php | |
/* | |
* Warning! Read and use at your own risk! | |
* | |
* This tiny proxy script is completely transparent and it passes | |
* all requests and headers without any checking of any kind. | |
* The same happens with JSON data. They are simply forwarded. | |
* | |
* This is just an easy and convenient solution for the AJAX |
#!/bin/sh | |
# toggle touch pad | |
device=`xinput list --name-only | grep -i touchpad` | |
isOn=`xinput list-props "$device" | grep -i enabled | tail -c 2` | |
iconEnabled='input-touchpad-symbolic' | |
iconDisabled='touchpad-disabled-symbolic' | |
case "$isOn" in | |
0) |
/* | |
* http://www.myersdaily.org/joseph/javascript/md5-text.html | |
*/ | |
(function (global) { | |
var md5cycle = function (x, k) { | |
var a = x[0], | |
b = x[1], | |
c = x[2], | |
d = x[3]; |
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
clearTimeout(timeout); |