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
angular.module('myApp') | |
.run(['$rootScope', function ($rootScope) { | |
window.i18n.init(options, function () { | |
// When finished loading translations, trigger re-evaluation of views for translations | |
$rootScope.$digest(); | |
}); | |
}]) | |
.filter('translate', [function(){ | |
return function(key, params) { | |
// i18next needs time to initialize (loading translations). In this phase translation does not work |
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
<!DOCTYPE html> | |
<html ng-app="minimalTestCase"> | |
<head> | |
<meta charset="UTF-8"> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/> | |
<!--script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script--> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.6.0/ui-bootstrap-tpls.js"></script> | |
<style> | |
div { |
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 | |
require_once 'Mockery/Loader.php'; | |
require_once 'Hamcrest/Hamcrest.php'; | |
require_once 'PHPUnit/Framework/TestCase.php'; | |
$loader = new \Mockery\Loader; | |
$loader->register(); | |
use Mockery as m; |
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 get(url, mimeType, successCallback, errorCallback) { | |
var page = require("webpage").create(), | |
basePageMatch = /^(https?:)?\/\/[^\/]+/.exec(url), | |
basePage = basePageMatch ? basePageMatch[0] : url; | |
// HACK for relative protocol support | |
if (basePage.indexOf("//") === 0) { | |
basePage = "http:" + basePage; | |
} |
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
$ ruby failing.rb -D | |
D, [2013-02-01T21:20:06.591576 #91923] DEBUG -- : USING JID: alice@localhost | |
D, [2013-02-01T21:20:06.591841 #91923] DEBUG -- : SENDING: (/Users/cburgmer/.rvm/gems/ruby-1.9.3-p327/gems/blather-0.8.2/lib/blather/stream/client.rb:11:in `start') <stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'> | |
D, [2013-02-01T21:20:06.592978 #91923] DEBUG -- : RECEIVING (stream) <stream:stream xmlns:stream="http://etherx.jabber.org/streams" id="2990861908" from="localhost" version="1.0" lang="en"/> | |
D, [2013-02-01T21:20:06.593362 #91923] DEBUG -- : RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams"> | |
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> | |
<mechanism>PLAIN</mechanism> | |
<mechanism>DIGEST-MD5</mechanism> | |
<mechanism>SCRAM-SHA-1</mechanism> | |
</mechanisms> |
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 findLamerz() { | |
/* | |
* Marks the slowest steps in your Jenkins Console output. | |
* 1. Enable Timestamper: https://wiki.jenkins-ci.org/display/JENKINS/Timestamper | |
* 2. Open your full Jenkins console output: http://TEH_JENKINS/job/TEH_BUILD_NAME/42/consoleFull | |
* 3. Open the JS console of your browser and paste the whole function | |
* 4. Run the following steps on the console, one after one: n = findLamerz(); n.next(); n.next(); ... | |
*/ | |
function parseSecondsFromTimestamp(time) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Test case for bug in Firefox where a transparent image is not properly transferred</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
function loadImage(url, callback) { | |
var image = new window.Image(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Test case for bug in Firefox where a background image in a SVG isn't rendered to the canvas unless a workaround is applied</title> | |
</head> | |
<body> | |
<canvas id="canvas" style="border:1px solid black;" width="200" height="200"></canvas> | |
<script type="text/javascript"> | |
var canvas = document.getElementById("canvas"), |
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
.resizable { | |
resize: both; /* Options: horizontal, vertical, both */ | |
overflow: auto; /* Options: scroll, hidden, auto */ | |
} |
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
// See https://developer.mozilla.org/en/DOM/XMLHttpRequest/Sending_and_Receiving_Binary_Data | |
var readBinaryFile = function (url) { | |
var content, newContent = ""; | |
$.ajax({ | |
dataType: 'text', | |
mimeType: 'text/plain; charset=x-user-defined', | |
url: url, | |
async: false, | |
cache: false, |