Skip to content

Instantly share code, notes, and snippets.

@hflamboauto1
hflamboauto1 / _proftpd_for_sftp.md
Created November 10, 2016 18:15 — forked from svalaskevicius/_proftpd_for_sftp.md
a guide to install sftp with proftpd

Setting up

The following commands assume the system is CentOS/RedHat Linux and ProFTPD configuration is same or similar to CentOS package version: 1.3.3g; release: 1.el6.

yum install proftpd

cd ~/
wget https://gist.github.com/raw/4296200/proftpd.conf.patch
@hflamboauto1
hflamboauto1 / setup_osx.sh
Created November 1, 2016 13:54 — forked from dstapp/setup_osx.sh
OS X setup script (currently 10.11)
#!/bin/bash
# Homebrew requires Xcode CLI tools to be installed. OS X provides stubs for CLI tools
# that trigger the CLI tools installer when called. So we call `git` to start the installation.
git
echo "Press any key when Xcode CLI tools installation is complete..."
read
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@hflamboauto1
hflamboauto1 / jenkins_haproxy_config.cfg
Created November 1, 2016 09:18 — forked from xelwarto/jenkins_haproxy_config.cfg
Jenkins CI haproxy configuration example
global
chroot /var/lib/haproxy
crt-base /etc/pki/tls/certs
daemon
group haproxy
log 127.0.0.1 local0
maxconn 2000
pidfile /var/run/haproxy.pid
stats socket /var/lib/haproxy/stats
tune.ssl.default-dh-param 2048
@hflamboauto1
hflamboauto1 / HAProxy SNI fallback workaround example
Created August 9, 2016 14:46 — forked from PiBa-NL/HAProxy SNI fallback workaround example
HAProxy SNI fallback/workaround example this example shows some of the possibilities that are possible to give 'best effort' support for browsers that do not support SNI.. (or at least my quick testcase/workout turned into this.., i dont use it myself, and i don't claim its actually usable for anyone.)
global
maxconn 300
log 192.168.0.40 local0 debug
stats socket /tmp/haproxy.socket level admin
gid 80
nbproc 1
chroot /var/empty
daemon
#
# Example configuration for HAProxy 1.5-dev19 for using SNI
@hflamboauto1
hflamboauto1 / gist:ac2625e24cb5fd488d1aafad8fee85b6
Created August 2, 2016 16:41 — forked from iMilnb/gist:b09f45e112b226b97a36
Minimalistic jinja2-based page generator
import sys
import markdown
import yaml
import os
from jinja2 import Environment, FileSystemLoader
with open(sys.argv[2], 'r') as f:
content = yaml.safe_load(f.read())
for k in content:
@hflamboauto1
hflamboauto1 / gist:c2eeaee7f6e116cc30a95ba268fff239
Created August 2, 2016 16:41 — forked from iMilnb/gist:ba7b46dfc854544bf3c8
Dynamic ipsec and racoon configuration generation for AWS EC2 VPN using boto3 and Jinja2
#!/usr/bin/env python
# $ cat ipsec_conf.tmpl
# {#
#
# cgw_in_addr: customer_gateway tunnel_inside_address ip_address
# cgw_in_cidr: customer_gateway tunnel_inside_address network_cidr
# vgw_in_addr: vpn_gateway tunnel_inside_address ip_address
# vgw_in_cidr: vpn_gateway tunnel_inside_address network_cidr
# cgw_out_addr: customer_gateway tunnel_outside_address
@hflamboauto1
hflamboauto1 / autoscaling_boto.py
Created July 6, 2016 11:09 — forked from numan/autoscaling_boto.py
Example of setting up AWS auto scaling using boto API
"""
The MIT License (MIT)
Copyright (c) 2011 Numan Sachwani
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@hflamboauto1
hflamboauto1 / README.md
Created July 6, 2016 11:06 — forked from magnetikonline/README.md
Using Dnsmasq with Ubuntu 16.04LTS/14.04LTS/12.04LTS for virtual machine web application testing.

Using Dnsmasq with Ubuntu for VM web application testing

When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts file on your host machine where we will keep a single set of DNS entires to our test web application(s).

@hflamboauto1
hflamboauto1 / README.md
Created July 6, 2016 11:05 — forked from magnetikonline/README.md
Create id_rsa public/private keys from supplied PPK formatted key file.

Create id_rsa public/private keys from supplied PPK formatted key file

Instructions for Ubuntu 14.04LTS (and more than likely others). Where keyfile.ppk is the PPK file you have in hand.

$ sudo apt-get install putty-tools
# create public key as [id_rsa.pub]
$ puttygen keyfile.ppk -o id_rsa.pub -O public-openssh
# create private key as [id_rsa]
$ puttygen keyfile.ppk -o id_rsa -O private-openssh
@hflamboauto1
hflamboauto1 / README.md
Created July 6, 2016 11:05 — forked from magnetikonline/README.md
AWS RDS MySQL parameter group tweaks.

AWS RDS MySQL parameter group tweaks

Parameter Value AWS default
character_set_server utf8
collation_server utf8_general_ci
default_storage_engine InnoDB InnoDB
innodb_buffer_pool_size {DBInstanceClassMemory*7/10} {DBInstanceClassMemory*3/4}
innodb_log_file_size 134217728 134217728
max_allowed_packet 4194304