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 php:5.6-cli | |
RUN apt-get update && apt-get install -y libmcrypt-dev \ | |
&& docker-php-ext-install mcrypt | |
CMD ["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
# tpl is a variable only template parser for bash. | |
tpl() { | |
if [ -z "$1" ]; then | |
echo "Must provide a tpl name: tpl tplname" | |
exit; | |
fi | |
TPL=$(cat $1) | |
eval "echo \"$TPL\"" | |
} |
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
/* | |
url1, _ := url.Parse("https://www.google.es") | |
url2, _ := url.Parse("http://www.mon.cat") | |
a := &proxy{ | |
entry: map[string]*httputil.ReverseProxy{ | |
"google": httputil.NewSingleHostReverseProxy(url1), | |
"mon": httputil.NewSingleHostReverseProxy(url2), | |
}, | |
} | |
http.Handle("/", a) |
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
Akelael: 8 | |
ChalsBcn: 8 | |
fernand0: 8 | |
fordperfect: 8 | |
hexus: 8 | |
JagerMeister: 8 | |
Killori: 8 | |
Mulworth: 8 | |
piti: 8 | |
Regor: 8 |
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
# Create | |
tar czpvf - /path/to/archive | split -d -b 100M - tardisk | |
# Decompress | |
cat tardisk* | tar xzpvf - | |
# http://superuser.com/questions/290986/how-to-create-tar-archive-split-into-or-spanning-multiple-files | |
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(){ | |
angular.module('mnt') | |
.directive('tTimer', function() { | |
return { | |
template: [ | |
'<div class="tpreload">', | |
' <div style="width:{{$ctrl.percent}}%"></div>', | |
'</div>' | |
].join("\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
package client | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" |
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
abstract class Model { | |
cuack(m:string):void { | |
console.log("Hey", m); | |
} | |
} | |
class Result { | |
getModelType<c extends Model>(type:{new():c}, p:string):c { | |
return new type(); | |
} |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
) | |
// type Limiter struct { |
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
localhost:2000 | |
tls self_signed | |
gzip | |
rewrite { | |
to {path} {path}/ /index.html | |
} | |
root ./dist |