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
FROM alpine:latest | |
RUN apk update && apk upgrade && \ | |
apk add --no-cache \ | |
openssh | |
RUN mkdir -p /keys/web /keys/worker | |
CMD ssh-keygen -t rsa -f /keys/web/tsa_host_key -N '' && \ | |
ssh-keygen -t rsa -f /keys/web/session_signing_key -N '' && \ |
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
#!/bin/bash | |
# guake-start.sh | |
guake --rename-tab="home" & | |
sleep 3 | |
guake --new-tab=2 --rename-tab="projects" --execute-command="cd ~/projects" & | |
sleep 1 | |
guake --new-tab=3 --rename-tab="develop" --execute-command="cd ~/projects" & | |
sleep 1 | |
guake --new-tab=4 --rename-tab="git" --execute-command="cd ~/projects" & | |
sleep 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
FROM alpine | |
RUN apk --no-cache add ncdu | |
COPY . /tmp/context | |
ENTRYPOINT ncdu /tmp/context |
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('helperFunctions', []) | |
.factory('throttle', ['$timeout', function ($timeout) { | |
return function (delay, no_trailing, callback, debounce_mode) { | |
var timeout_id, | |
last_exec = 0; | |
if (typeof no_trailing !== 'boolean') { | |
debounce_mode = callback; | |
callback = no_trailing; | |
no_trailing = undefined; |
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
'use strict'; | |
var retryForever = true; | |
var retryTimeout = 5000; | |
exports = module.exports = function ($http, $q, $timeout) { | |
function httpRetry () { | |
var args = arguments; | |
var httpPromise = $http.apply(null, args); |
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
------------------------------------------------------------------------------- | |
-- HTTP Accept-Language header handler -- | |
-- @originalAuthor: f.ghibellini@gmail.com -- | |
-- @originalRepository: https://github.com/fghibellini/nginx-http-accept-lang-- | |
-- @modifiedBy: marian.hello@mapilary.com -- | |
-- @gist: https://gist.github.com/mauron85/47ed1075262d9e020fe2 -- | |
-- @license: MIT -- | |
-- @requires: -- | |
-- @description: -- | |
-- returns language with greatest quality -- |
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
/** | |
* Example true backend for angular-login-example | |
*/ | |
var express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
var app = express(); | |
// from https://github.com/mrgamer/angular-login-example/blob/master/src/mockhttp.js#L51-L58 |
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
# EditorConfig is awesome: http://editorconfig.org/ | |
# Please, read it! | |
# top-most EditorConfig file | |
root = true | |
[*] | |
charset = utf8 | |
end_of_line = lf | |
indent_style = space |
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
/** | |
* tail -f webserver version, using chunked responses (HTTP 1.1) | |
* slides: http://goo.gl/4VuKS6 | |
*/ | |
var fs = require('fs'), | |
util = require('util'), | |
http = require('http'); | |
http.createServer(function (req, res) { | |
fs.stat(req.url, function (err, stats) { |
NewerOlder