Skip to content

Instantly share code, notes, and snippets.

View gdm's full-sized avatar

Dmytro Gorbunov gdm

View GitHub Profile
@gdm
gdm / 30-income-calculon.pl
Created January 13, 2016 14:14 — forked from avar/30-income-calculon.pl
Calculate your income in The Netherlands with and without a 30% ruling.
# To check if this is up-to-date with the tax rates go to
# http://www.expatax.nl/tax-rates-2015.php and see if there's anything
# newer there.
#
# I make no guarantees that any of this is correct. I calculated this
# at the time and have been updating it when new tax rates come along
# because people keep finding this useful.
#
# There's also an interactive JS version of this created by
# @stevermeister at
@gdm
gdm / send_mail.py
Created March 1, 2016 13:50 — forked from vjo/send_mail.py
[Python] Send email with embedded image and application attachment
#! /usr/bin/python
import smtplib
from optparse import OptionParser
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.application import MIMEApplication
@gdm
gdm / prettyjson
Last active May 19, 2019 21:25 — forked from expandrive/prettyjson
Take JSON from stdin and dump it to stdout in a more readable form
#!/usr/bin/python
# or jq '.' - don't re-invent the wheel :)
# From http://stackoverflow.com/questions/352098/how-to-pretty-print-json-script
# To install paste this into a file named prettyjson that lives in your PATH
# e.g.
# sudo touch /usr/bin/prettyjson
# sudo open -t /usr/bin/prettyjson
# paste this file and save
# sudo chmod +x /usr/bin/prettyjson
@gdm
gdm / nginx.conf
Created September 13, 2016 14:40 — forked from jrom/nginx.conf
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@gdm
gdm / nginx.conf
Created November 2, 2016 01:11 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@gdm
gdm / nginx.conf
Created December 14, 2016 14:02 — forked from cpswan/nginx.conf
Using nginx to proxy to an AWS ELB
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http{
sendfile on;
@gdm
gdm / jobs.js
Last active December 20, 2016 09:51 — forked from maximilianschmitt/jobs.js
Automated MySQL backups to S3 with node.js
'use strict';
var mysqlBackup = require('./mysql-backup');
var schedule = require('node-schedule');
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup);
@gdm
gdm / luksloopback.sh
Last active September 28, 2017 19:47 — forked from dbehnke/luksloopback.sh
luks encryption with loopback file
#!/bin/bash -xe
loopdevice=/dev/loop0
loopfile=/root/crypt.loop
#megabytes
loopsize=256
#/dev/mapper/xxxxx when open
cryptmapper=crypt
@gdm
gdm / jenkins-is-dead.md
Created October 11, 2020 11:39 — forked from michaellihs/jenkins-is-dead.md
Jenkins is dead - long live Jenkins!

Jenkins is dead - long live Jenkins!

Brainstorming

  • Basic Concepts
    • Continuous Delivery

      Delivering Software with confidence, small increments, frequent releases, requires automated tested, automated deployment, automated infrastructure

  • Pipelines
@gdm
gdm / running-minio-in-minikube.md
Created November 11, 2020 19:21 — forked from balamurugana/running-minio-in-minikube.md
Running minio in minikube

Prerequisites:

  • Run minikube with kvm driver by $ minikube start --vm-driver kvm

Minio FS mode:

  1. Deploy minio in fs mode with below yaml in a file like $ kubectl create -f my-minio-fs.yaml
## Create persistent volume claim for minio to store data.
apiVersion: v1
kind: PersistentVolumeClaim