Skip to content

Instantly share code, notes, and snippets.

@boncheff
boncheff / Makefile
Created May 31, 2016 14:36
Simple Makefile for a dockerised go application
binary:
CGO_ENABLED=0 go build -v -o <project_name> .
.PHONY : binary
container: binary
docker build -t <project_name> -f Dockerfile .
.PHONY : container
clean:
rm -f <project_name>
@boncheff
boncheff / email_sender.py
Created May 10, 2016 09:57
Python script that uses PhantomJS to create screenshots of HTML elements and sends an email using gmail
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEImage import MIMEImage
import os
widgets = [
{
'name': 'Cloud Summary',
'output_file': 'cloud_summary.png',
var page = require('webpage').create();
// for each widget['name'] generate a file with widget['output_file'] as name
var widgets = [
{
'name': 'Cloud Summary',
'output_file': 'cloud_summary.png',
},
{
'name': 'Performance Graph',
@boncheff
boncheff / parser.py
Last active April 21, 2016 08:37
Python grammar parser using pyparsing module
from __future__ import division
import re
from pyparsing import (
Word,
alphas,
ParseException,
Literal,
CaselessLiteral,
Combine,