Skip to content

Instantly share code, notes, and snippets.

View IngussNeilands's full-sized avatar

Inguss Neilands IngussNeilands

View GitHub Profile
@IngussNeilands
IngussNeilands / gist:59e515cd689ae1c5179edcf3df7c1cab
Last active November 3, 2017 11:07
Docker: Remove all images and containers
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
As of 1.13.0, see the new prune commands:
docker container prune # Remove all stopped containers
docker volume prune # Remove all unused volumes
@IngussNeilands
IngussNeilands / ansible.cfg
Created October 31, 2017 16:38 — forked from nazarewk/ansible.cfg
Ansible SSH Agent forwarding with Jump (bastion) host
[defaults]
sudo_flags = SSH_AUTH_SOCK="$SSH_AUTH_SOCK" -H -S -n
[ssh_connection]
ssh_args=-o ForwardAgent=yes
@IngussNeilands
IngussNeilands / nginx.conf
Created September 27, 2017 13:49 — forked from asiegman/nginx.conf
nginx logstash output
# Output json-esque output for logstash to parse easily.
http {
# ...
log_format logstash_json '{"@timestamp": "$time_iso8601", '
'"remote_addr": "$remote_addr", '
'"remote_user": "$remote_user", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '
@IngussNeilands
IngussNeilands / mon_passenger.sh
Created September 22, 2017 14:32 — forked from deepak/mon_passenger.sh
collectd plugin to monitor passenger
#!/bin/bash
# collectd plugin to monitor passenger
# has better memory-requirement than a ruby script
# TODO: try writing it in c - if it makes a difference
HOSTNAME="production-host-01"
INTERVAL="${COLLECTD_INTERVAL:-10}"
PLUGIN_NAME="passenger_status"
while sleep "$INTERVAL"
@IngussNeilands
IngussNeilands / CI Alternatives.md
Created September 18, 2017 13:51 — forked from xpepper/CI Alternatives.md
CI, alternative a confronto :-)

Continuous Integration - Know your opportunities

Continuous Integration in a nutshell

Continuous Integration (CI) is an important practice every team should adopt in order to detect defects and errors early and solve integration problems easily. Roughly speaking we may say that CI is a practice that allows the growth of solid software by giving greater confidence to the developers and better products to the final customers.

The concept behind CI is fairly simple: the codebase is owned by several developers that continuously integrate their changes to a common version control system. For each integration the system runs a predefined set of tasks automatically; these tasks may vary from running all the tests to building all the components.

###GOOGLE Console DEV
Original JavaScript autorized
http://grafana.mydomain.com.br
URIs redirect autorized
http://grafana.mydomain.com.br:3000/login/google
### NGINX PROXY
server {
If you are using Google Chrome and Client SSL Cert and you are tired of constantly selecting certificates, try this:
1. Download and extract Chrome policy templates from here: http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip
2. Start the Local Group Policy Editor: Start > Run > gpedit.msc > OK
3. Right-click on Computer Policy > Computer Configuration > Administrative Templates and choose Add/Remove Templates…
4. Click Add…, choose policy_templates\windows\adm\en-US\chrome.adm (from the already downloaded and extracted policy templates) and click Open (Note: if your Windows language is different from en-US choose the chrome.adm from the respective language folder)
5. Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > Classic Administrative Templates (ADM) > Google > Google Chrome > Content Settings
6. Double-click on Automatically select client certificates for these sites
7. Click Enabled
8. Click Show… in the Options pane
@IngussNeilands
IngussNeilands / Jenkins_Protractor_Headless_Chrome_Setup_Ubuntu_14.04.md
Created August 2, 2017 09:38 — forked from praphull27/Jenkins_Protractor_Headless_Chrome_Setup_Ubuntu_14.04.md
Jenkins, Protractor and Headless Chrome Browser Setup on Ubuntu 14.04

Jenkins, Protractor and Headless Chrome Browser Setup on Ubuntu 14.04

Update Ubuntu

sudo apt-get update
sudo apt-get upgrade

Install Java

@IngussNeilands
IngussNeilands / docker-nftables.conf
Created July 18, 2017 06:04 — forked from dearing/docker-nftables.conf
nftables with docker
# /etc/systemd/system/docker.service.d/docker-nftables.conf
# disable iptables in docker, allowing nftables to do work
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --iptables=false
@IngussNeilands
IngussNeilands / haproxy.conf
Created June 23, 2017 14:47 — forked from nateware/haproxy.conf
HAProxy sample config for EC2
#
# This config file is a combination of ideas from:
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/
# http://wiki.railsmachine.com/HAProxy
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/
# http://wiki.railsmachine.com/HAProxy
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9
#