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('appMock', ['ngMockE2E']) | |
.factory('delayHTTP', function ($q, $timeout) { | |
return { | |
request: function (request) { | |
var delayedResponse = $q.defer(); | |
$timeout(function () { | |
delayedResponse.resolve(request); | |
}, 500); | |
return delayedResponse.promise; | |
}, |
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('app', ['appMock']) | |
.controller('BodyController', function ($scope, $http) { | |
$scope.games = []; | |
// function bound to the refrsh button | |
$scope.refresh = function () { | |
$http.get('/games').success(function (data, status, headers, config) { | |
$scope.games = data; | |
}); | |
}; |
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
/** | |
* Thanks Raymond Powell | |
* http://stackoverflow.com/a/14640439/1071793 | |
*/ | |
String.prototype.format = function () { | |
var formatted = this, | |
prop, | |
regexp = new RegExp('\\{' + prop + '\\}', 'gi'); | |
for (prop in arguments[0]) { | |
formatted = formatted.replace(regexp, arguments[0][prop]); |
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
[push] | |
default = matching | |
[color] | |
diff = true | |
ui = true | |
branch = true | |
[color "branch"] | |
remote = white reverse | |
[color "diff"] | |
meta = yellow bold |
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 http = require('http'); | |
http.createServer(function (request, response) { | |
// response.setHeader('Content-Type', 'application/json; charset=UTF-8'); | |
// response.setHeader('Transfer-Encoding', 'chunked'); | |
var html = | |
'<!DOCTYPE html>' + | |
'<html lang="en">' + | |
'<head>' + |
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
server { | |
listen 80; | |
server_name *.test; | |
gzip on; | |
location / { | |
#proxy_set_header Host api.github.com; | |
proxy_pass http://localhost:1337/; | |
proxy_buffering off; | |
proxy_http_version 1.1; |
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
server { | |
listen 80; | |
server_name *.github; | |
location / { | |
proxy_set_header Host api.github.com; | |
proxy_pass https://api.github.com/; | |
} | |
access_log /var/log/nginx/github_access.log combined; |
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/Monokai (SL).tmTheme", | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"font_size": 10, | |
"margin": 2, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, |
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
# status bar | |
set-option -g status-utf8 on | |
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# default window title colors | |
set-window-option -g window-status-fg colour244 #base0 |
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
{ | |
"passfail": false, | |
"maxerr": 10, | |
"browser": true, | |
"node": true, | |
"debug": false, | |
"devel": false, | |
"strict": false, |