Skip to content

Instantly share code, notes, and snippets.

View Dolbager's full-sized avatar
🦄
Working hard

Mike Dolbager

🦄
Working hard
View GitHub Profile
function ssht {
ssh $@ -t 'tmux -CC attach || tmux -CC'
}
version: "2"
services:
consul1:
image: "consul:latest"
container_name: "consul1"
hostname: "consul1"
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
@Dolbager
Dolbager / gist:c4dd429014e901d17639c5798cbe4d32
Created August 10, 2016 14:39
GROK for nginx timelog format
(%{NUMBER:upresp_time}|-) %{NUMBER:req_time} \"(%{IPV4:upstr_addr}:%{NUMBER:port}|%{NOTSPACE:upstr})\" %{IPV4:remote_addr} %{SYSLOG5424SD:date} %{NUMBER:response} %{QS} \"(?:%{WORD:verb}%{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})\" %{NUMBER:req_len}/%{NUMBER:bytes_send} %{QS:refer} %{QS:user_agent} %{IPORHOST:host}
@Dolbager
Dolbager / create.sh
Created July 29, 2016 11:35
crate docker base image
#!/bin/sh
set -e
image_tag="ubuntu-base-14.04-i386:initial"
debootstrap --arch=i386 trusty /tmp/rootfs32
tar czf /tmp/trusty_base32_rootfs.tgz -C /tmp/rootfs32 .
echo ""
image_id=`cat /tmp/trusty_base32_rootfs.tgz | docker import - $image_tag`
@Dolbager
Dolbager / timelog for nginx
Last active August 10, 2016 14:38
timelog for nginx
log_format timelog '$upstream_response_time $request_time "$upstream_addr" $remote_addr [$time_local] $status "$sent_http_x_counter" "$request" $request_length/$bytes_sent "$http_referer" "$http_user_agent" $host';
@Dolbager
Dolbager / nginx.conf
Created September 24, 2015 14:53 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048