This file contains hidden or 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/sh | |
| ### BEGIN INIT INFO | |
| # Provides: btsync | |
| # Required-Start: $local_fs $remote_fs | |
| # Required-Stop: $local_fs $remote_fs | |
| # Should-Start: $network | |
| # Should-Stop: $network | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Multi-user daemonized version of btsync. |
This file contains hidden or 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 | |
| // ... | |
| $sets = array_map( | |
| function($set) { | |
| return explode(",", end(explode(": ", $set))); | |
| }, | |
| array_filter( | |
| explode("\n", file_get_contents($url)), |
This file contains hidden or 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
| # take one | |
| # subdirectory (one server, multiple services) | |
| location /btsync/ { | |
| rewrite ^/btsync/gui(.*) /btsync$1 last; | |
| proxy_pass http://127.0.0.1:8888/gui/; | |
| proxy_redirect /gui/ /btsync/; | |
| proxy_buffering off; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or 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
| hosts=/etc/hosts | |
| host=$1 | |
| ip=$2 | |
| if [ "$ip" = "" ]; then | |
| ip=$(wget -qO- http://checkip.dyndns.org | cut -f2 -d":" | cut -f1 -d"<" | sed "s/ //") | |
| fi | |
| line=$(grep $host $hosts) |
This file contains hidden or 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
| #******************************************************************** | |
| # WARNING:: This whole exercise is performed while logged in as root. | |
| # FOLLOW AT YOUR OWN RISK | |
| #******************************************************************** | |
| # Setup a working directory anywhere you like. I'm using /vb/snakex. | |
| mkdir /vb/snakex | |
| cd /vb/snakex | |
| export MYTOP=`pwd` |
This file contains hidden or 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
| diff -rupN nginx-1.6.2/auto/modules nginx-1.6.2-socks-upstream/auto/modules | |
| --- nginx-1.6.2/auto/modules 2014-09-16 09:23:19.000000000 -0300 | |
| +++ nginx-1.6.2-socks-upstream/auto/modules 2014-10-29 19:28:26.451597644 -0200 | |
| @@ -381,6 +381,11 @@ if [ $HTTP_UPSTREAM_LEAST_CONN = YES ]; | |
| HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_LEAST_CONN_SRCS" | |
| fi | |
| +if [ $HTTP_UPSTREAM_SOCKS = YES ]; then | |
| + have=NGX_HTTP_UPSTREAM_SOCKS . auto/have | |
| + HTTP_SRCS="$HTTP_SRCS src/http/modules/ngx_http_upstream_socks_module.c" |
This file contains hidden or 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" | |
| "io/ioutil" | |
| "os" | |
| "regexp" | |
| "sort" | |
| "strconv" | |
| "strings" |
This file contains hidden or 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" | |
| "runtime" | |
| ) | |
| type CPF []int | |
| func NewCPF(cpf int64) CPF { |
This file contains hidden or 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
| cache=/var/db/vwash.cache | |
| touch $cache | |
| while read line; do | |
| mac=$(echo "$line" | cut -d: -f1-3) | |
| if echo $mac | grep -i -e '[a-f0-9]\{2\}:' > /dev/null; then | |
| lookup=$(grep "$mac=" $cache) | |
| if [ $? -gt 0 ]; then |