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
~^ | |
# scheme | |
[-a-z0-9+.]++:// | |
# username:password (optional) | |
(?: | |
[-a-z0-9$_.+!*\'(),;?&=%]++ # username | |
(?::[-a-z0-9$_.+!*\'(),;?&=%]++)? # password (optional) | |
@ |
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
defmodule Chat.Server do | |
use GenServer | |
def init(_args) do | |
{:ok, %{messages: [], users: []}} | |
end | |
def handle_info({:message, message}, state) do | |
broadcast(state.users, message) | |
{:noreply, %{state | messages: [message | state.messages]}} |
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
docker run -d --name=rancher-server --restart=unless-stopped -p 8080:8080 rancher/server |
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
upstream rancher { | |
server rancher-server:8080; | |
} | |
map $http_upgrade $connection_upgrade { | |
default Upgrade; | |
'' close; | |
} | |
server { | |
listen 443 ssl http2; | |
server_name <SERVER_NAME>; |
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
wget https://dl.eff.org/certbot-auto | |
chmod a+x certbot-auto | |
./certbot-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
apt-get update && apt-get -y dist-upgrade && apt-get -y install vim wget docker.io |
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
input(type="imudp" port="514" ruleset="logsene") | |
ruleset(name="logsene") { | |
local0.* action( | |
type="omfwd" | |
target="logsene-receiver-syslog.sematext.com" | |
port="514" | |
protocol="tcp" | |
template="RSYSLOG_SyslogProtocol23Format" | |
) |
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
% sudo diamond -fl ~ Ubuntu-1604-xenial-64-minimal | |
1466899914.29 [MainProcess:25662:INFO] Changed UID: 0 () GID: 0 (). | |
1466899914.33 [MainProcess:25662:DEBUG] metric_queue_size: 16384 | |
1466899914.33 [MainProcess:25662:DEBUG] Loading Handler diamond.handler.hostedgraphite.HostedGraphiteHandler | |
1466899914.34 [MainProcess:25662:DEBUG] GraphiteHandler: Established connection to graphite server carbon.hostedgraphite.com:2003. | |
1466899914.34 [MainProcess:25662:ERROR] Can not find collector VMStatCollector | |
1466899914.34 [MainProcess:25662:ERROR] /usr/local/lib/python2.7/dist-packages/diamond/server.py:181 | |
1466899914.34 [MainProcess:25662:ERROR] Can not find collector CPUCollector | |
1466899914.34 [MainProcess:25662:ERROR] /usr/local/lib/python2.7/dist-packages/diamond/server.py:181 | |
1466899914.34 [MainProcess:25662:ERROR] C |
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
% sudo pypi-install diamond ~ Ubuntu-1604-xenial-64-minimal | |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | |
running the following command in directory: deb_dist/tmp_py2dsc/diamond-4.0.451 | |
/usr/bin/python setup.py --command-packages stdeb.command sdist_dsc --dist-dir=/tmp/tmpe7kyUb/deb_dist --use-premade-distfile=/tmp/tmpe7kyUb/diamond-4.0.451.tar.gz bdist_deb | |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | |
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' | |
warnings.warn(msg) | |
running sdist_dsc | |
Traceback (most recent call last): | |
File "setup.py", line 147, in <module> |
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
➜ elixir git:(416bf41) make clean test | |
cd lib/elixir && "/Users/chvanikoff/github/elixir/rebar" clean | |
==> elixir (clean) | |
rm -rf ebin | |
rm -rf lib/*/ebin | |
rm -rf lib/elixir/test/ebin | |
rm -rf lib/*/tmp | |
rm -rf lib/mix/test/fixtures/git_repo | |
rm -rf lib/mix/test/fixtures/deps_on_git_repo | |
rm -rf lib/mix/test/fixtures/git_rebar |
NewerOlder