Skip to content

Instantly share code, notes, and snippets.

@vpack
vpack / Prometheus.md
Last active August 10, 2016 12:11
Prometheus

Collect metrics from Docker Host:

docker run -d -p 9104:9104 -v /sys/fs/cgroup:/cgroup -v /var/run/docker.sock:/var/run/docker.sock prom/container-exporter

Server:

@vpack
vpack / vimdiff.md
Created July 11, 2016 15:36
vimdiff

Simple and easy way to compare old and new files especially working with git merge.

vimdiff file1 file2
vim -d file1 file2

Commands:

]c - next diff
@vpack
vpack / 1mesos-troubleshooting.md
Last active July 25, 2016 07:18
Mesos Troubleshooting

Master

# Environment Files:
/opt/mesosphere/etc/cfn_signal_metadata
/opt/mesosphere/environment

# Run
/opt/mesosphere/bin/cfn-signal
@vpack
vpack / 1setup.sh
Created June 29, 2016 13:36
Docker Image Migration
aws ecr get-login > /tmp/key
sh -x /tmp/key
@vpack
vpack / flask_ssl_app.py
Last active November 14, 2024 16:51
Flask SSL Sample APP
from flask import Flask
from flask_sslify import SSLify
"""
Option 1 : (pip install pyopenssl)
from OpenSSL import SSL
context = SSL.Context(SSL.SSLv23_METHOD)
context.use_privatekey_file('web.key')
context.use_certificate_file('web.crt')
@vpack
vpack / threat_indicators.py
Created June 21, 2016 14:17
Facebook API : threat_indicators
import requests
import json
url = "https://graph.facebook.com/v2.4/threat_indicators"
params = {
"type": "IP_ADDRESS",
"text": "proxy",
"access_token": "XXXX|YYYY",
"limit": "1000",
"after": "dummy"
@vpack
vpack / 01.md
Last active June 1, 2016 03:01
Terraform

Folder structure

/project
 |---> /terraform
 |       |--> /_env/aws # .tfvars file
 |       |--> /aws  # .tf files
 |---> /packer
 |---> bin/gen_ssh.sh
@vpack
vpack / gitflow.md
Last active April 22, 2016 17:59
Git Flow

Git Flow

Commands

git flow init
git branch # View Branches

git push origin develop