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
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateFailedJobsTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
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 setTitle(voteAt, minutesAgo, originalTitle) { | |
var voteIn = voteAt - minutesAgo; | |
var unit = (voteIn === 1 ? 'minute' : 'minutes'); | |
var newTitle = '<Votes in ' + voteIn + ' ' + unit + '> | ' + originalTitle; | |
if (document.title !== newTitle) { | |
document.title = newTitle; | |
} |
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 waitForAndExecute = function(waitForFun, execFun) { | |
(function() { | |
function waitForAndExecute(waitForFun, execFun) { | |
if (!waitForFun()) { | |
setTimeout(function() { | |
waitForAndExecute(waitForFun, execFun); | |
}, 100); | |
return; | |
} |
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 isVisible = function(obj) { | |
return obj.offsetWidth > 0 && obj.offsetHeight > 0; | |
}; | |
var curry = function(uncurried) { | |
var parameters = Array.prototype.slice.call(arguments, 1); | |
return function() { | |
return uncurried.apply(this, parameters.concat(Array.prototype.slice.call(arguments, 0))); | |
}; |