Skip to content

Instantly share code, notes, and snippets.

@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
@vpack
vpack / toggl.sh
Last active April 7, 2016 22:35
Toggl timesheet - Automate
# Hate this work and so i scripted it !!
# Start Time is set to 9:00 AM EST - Change as needed
# Get your Token from Toggl settings page
create_timesheet(){
for DY in $1
do
curl -u MYNEWTOKENMYNEWTOKENMYNEWTOKEN:api_token -H "Content-Type: application/json" \
-d '{"time_entry":{"description":"MYNEWCLIENT","billable":true,"duration":28800,"start":"2016-'$MTH'-'$DY'T13:00:00.000Z","created_with":"curl"}}' \