Skip to content

Instantly share code, notes, and snippets.

iMil iMilnb

Block or report user

Report or block iMilnb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iMilnb / gist:5787416
Created Jun 15, 2013
state file for Zend Server 6 deployment via SaltStack
View gist:5787416
### setup Zend Server
{% if 'php_version' in grains %}
{% set php_version = grains['php_version'] %}
{% else %}
# pillars are set in our common/pillar
{% set php_version = pillar['zs6_php'] %}
{% endif %}
{% set zs_user = pillar['zs6_user'] %}
{% set zs_serial = pillar['zs6_serial'] %}
iMilnb /
Created Jun 17, 2013
A simple SaltStack returner that prints state summary in a human-readable flat file
Return human readable salt data to a flat file
# Import python libs
import yaml
def __virtual__():
return 'file'
iMilnb /
Created Jun 17, 2013
Human-readable smtp returner for Salt
Return yaml-formatted salt data via email
The following fields can be set in the minion conf file:
smtp.from (required) (required) (required)
smtp.username (optional)
smtp.password (optional)
iMilnb / gist:6274243
Created Aug 19, 2013
Update OpenVPN remotes for vpntunnel endpoints with IP addresses instead of FQDN as resolving fails from time to time
View gist:6274243
[ $# -lt 1 ] && exit 1
host -t a ${tunnel} >/dev/null 2>&1 || exit 1
iMilnb / gist:8146933
Created Dec 27, 2013
configuration nginx pour réecrire les requètes de la neufbox vers l'infra neuf
View gist:8146933
server {
listen 89; # le traffic de la neufbox est capturé puis renvoyé vers le port 89 via pf
server_name foobar *;
access_log /var/log/nginx/neufbox.access.log;
error_log /var/log/nginx/neufbox.error.log;
location / {
iMilnb / gist:8389380
Created Jan 12, 2014
Oneliner to generate dvblast configuration files from `channels.conf'
View gist:8389380
i=1 && for f in `cut -f2 -d: channels.conf |sort -u`; do cf=etc/dvblast$((i++)).conf; echo "; dvblast -f $f -c $cf" > $cf; awk -F: -v f=$f -v b=$i 'BEGIN {p = 0} $0 ~ f {printf "; %s\n224.0.0.%s:123%d 1 %s %s,%s\n",$1,b,++p,$13,$11,$12}' channels.conf >> $cf ;done
use Storable qw(retrieve);
use JSON;
my $h;
my $json;
my @jarr;
@files = <$ARGV[0]>;
foreach $file (@files) {
$h = retrieve($file);
iMilnb / gist:7604f04223d44a3e13af
Last active Aug 29, 2015
Keep track of Twitter "unfollowers"
View gist:7604f04223d44a3e13af
# track unfollows on twitter using "t"
# usage:
# to check if any of your followers has stopped following you since the last
# time the script wall called, use:
# $ this_script followers
# to check if YOU stopped following someone (it appears many of us witnessed
iMilnb / gist:b09f45e112b226b97a36
Last active Dec 4, 2017
Minimalistic jinja2-based page generator
View gist:b09f45e112b226b97a36
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(
for k in content:
iMilnb /
Created May 27, 2015
AWS EC2 simple manipulation script using python and boto3
#!/usr/bin/env python
# Simple [boto3]( based EC2 manipulation tool
# To start an instance, create a yaml file with the following format:
# frankfurt:
# - subnet-azb:
# - type: t2.micro
# image: image-tagname
You can’t perform that action at this time.