Skip to content

Instantly share code, notes, and snippets.

Michal Kubenka mkubenka

Block or report user

Report or block mkubenka

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
@mkubenka
mkubenka / install.sh
Created Apr 23, 2016
OpenVPN Access Server Letsencrypt
View install.sh
#!/bin/sh
apt-get -y install git bc
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
mkdir /etc/letsencrypt
@mkubenka
mkubenka / get_snds_data.py
Created Apr 18, 2016
Download Outlook Smart Network Data Service Data for last 90 days
View get_snds_data.py
# Enable automated data access under https://postmaster.live.com/snds/auto.aspx
import datetime
import requests
import shutil
DATA_URL = 'https://postmaster.live.com/snds/data.aspx?key=xx'
for i in range(90):
date = datetime.datetime.now() + datetime.timedelta(-i)
@mkubenka
mkubenka / Vagrantfile
Last active May 29, 2019
Windows on AWS with Vagrant
View Vagrantfile
require 'inifile'
require 'date'
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.guest = "windows"
config.vm.boot_timeout = 600
config.vm.provider :aws do |aws, override|
@mkubenka
mkubenka / sparsecheckout.yml
Created Dec 1, 2018
Ansible Sparse Checkout
View sparsecheckout.yml
---
- hosts: all
vars:
repo_url: ssh://git@github.com/user/repo.git
base_dir: /var/www
sparse_checkout:
- folder1
@mkubenka
mkubenka / isohybrid.pl
Created Nov 21, 2018 — forked from jsarenik/isohybrid.pl
isohybrid.pl from Syslinux-6.03
View isohybrid.pl
#!/usr/bin/perl
## -----------------------------------------------------------------------
##
## Copyright 2002-2008 H. Peter Anvin - All Rights Reserved
## Copyright 2009 Intel Corporation; author: H. Peter Anvin
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
## Boston MA 02111-1307, USA; either version 2 of the License, or
View rpi-kiosk.md

RPi Kiosk

$ sudo apt-get update
$ sudo apt-get install unclutter
$ vim.tiny ~/.config/lxsession/LXDE-pi/autostart
View api.py
from tastypie.exceptions import NotFound
from tastypie.resources import ModelResource
from tastypie.authentication import BasicAuthentication, ApiKeyAuthentication
from tastypie.models import ApiKey
from django.contrib.auth.models import User
__author__ = 'martinsandstrom'
class ApiTokenResource(ModelResource):
@mkubenka
mkubenka / terraform-build.md
Created Oct 5, 2017
Compiling Terraform Provider with Docker for OSX
View terraform-build.md

Compiling Terraform Provider with Docker for OSX

Create binary terraform-provider-aws in current directory:

docker run \
  --rm \
  -v $(pwd):/go/src/github.com/terraform-providers/terraform-provider-aws \
  -w /go/src/github.com/terraform-providers/terraform-provider-aws \
  -e GOOS=darwin \
@mkubenka
mkubenka / scaleway_packet_loss.md
Created Jul 9, 2017
Scaleway AMS1 Network Issues
View scaleway_packet_loss.md

Two fresh instances in rescue mode:

  • AMS1 - VC1S - scw-7a0865 - 51.15.40.49
  • PAR1 - VC1S - scw-8d89f4 - 163.172.189.156

AMS1

root@scw-7a0865:~# curl checkip.amazonaws.com
51.15.40.49
@mkubenka
mkubenka / clean.ps1
Last active Apr 30, 2017
Remove the ‘Modern apps’ (anything from the ‘Store’) from the profile you are using to create your Windows 10 image.
View clean.ps1
# Remove some Windows Store pakacges which are blocking Sysprep
# Execution of scripts has to be neabled: Set-ExecutionPolicy RemoteSigned
# https://forums.fogproject.org/topic/5873/windows-10-unattend-xml-sysprep-answer-file-challenge/16
$AppsList = "Microsoft.Bing" , "Microsoft.BingFinance" , "Microsoft.BingMaps" , "Microsoft.BingNews"`
, "Microsoft.BingSports" , "Microsoft.BingTravel" , "Microsoft.BingWeather" , "Microsoft.Camera"`
, "microsoft.microsoftskydrive" , "Microsoft.Reader" , "microsoft.windowscommunicationsapps"`
, "microsoft.windowsphotos" , "Microsoft.XboxLIVEGames" , "Microsoft.ZuneMusic"`
, "Microsoft.ZuneVideo" , "Microsoft.Media.PlayReadyClient"
, "9E2F88E3.Twitter", "king.com.CandyCrushSaga"
You can’t perform that action at this time.