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 a = [], i = 0; | |
function addPart(part, callback) { | |
setTimeout(function(part) { | |
a.push(part); | |
callback(); | |
}, 200); | |
}; | |
function init(callback) { | |
function check() { |
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
Exception | |
NoMethodError | |
Error | |
undefined method `id' for nil:NilClass | |
/home/gitlab/gitlab/app/models/project.rb:104:in `find_with_namespace' | |
/home/gitlab/gitlab/app/workers/post_receive.rb:9:in `perform' | |
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
/** | |
* Live updating API JS client side class | |
* @author Tim Davies | |
*/ | |
function LiveupdatingClient (container) | |
{ | |
/** | |
* Set up, include handlebars and setup template | |
*/ | |
var endpoint = 'liveupdating.php'; |
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 | |
$string = "January 5th, 2012"; | |
list($month, $day, $year) = array_map(function($v) { return trim($v, ","); }, explode(" ", $string)); | |
var_dump($month, $day, $year); | |
// string(7) "January" | |
// string(3) "5th" | |
// string(4) "2012" |
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 | |
class Controller_Blog extends Controller { | |
/** | |
* This is a simple example, the class does not exist. There are much more | |
* things you would be able to do, this is just an example. | |
* | |
* Yes, I know this is all (kind of) currently possible, but this encapsulates | |
* the response and allows for nice things like advanced response caching. |
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 | |
include 'config.php'; | |
// This should go in your config.php ^^ | |
define('BASEPATH', dirname(__FILE__)); | |
// Also, convention is capitals for constants | |
define('NAME', "Tom"); | |
function tint($tinty){ |