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 / zram
Last active Aug 29, 2015 — forked from janlam7/zram
View zram
#!/bin/bash
# -*- sh -*-
: << =cut
=head1 NAME
zram - Plugin to monitor zram usage
=head1 CONFIGURATION
View sphinx_
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use File::Basename;
#---------------------------------------------------------------------
@mkubenka
mkubenka / gist:b4324b553a7fad89e29c
Created Oct 28, 2015 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
View gist:b4324b553a7fad89e29c

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@mkubenka
mkubenka / accountid_boto3.py
Created Jan 27, 2016 — forked from Ashex/accountid_boto3.py
Get Account ID from boto3 via IAM or Role ARN
View accountid_boto3.py
import boto3
import argparse
def main():
argparser = argparse.ArgumentParser(description='Testing ARN stuff')
argparser.add_argument("--role", help="If running with a role provide it here", required=True)
argparser.add_argument("--profile", help="Credential profile", required=True)
argparser.add_argument('--region', help='AWS Region to work within, defaults to eu-central-1', default='eu-central-1', required=False)
args = argparser.parse_args()
role = args.role
@mkubenka
mkubenka / NSString+KBAdditions.h
Last active Mar 16, 2016 — forked from kevboh/NSString+KBAdditions.h
Add support for iOS7.
View NSString+KBAdditions.h
@interface NSString (KBAdditions)
- (CGFloat)fontSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size minimumScaleFactor:(CGFloat)minimumScaleFactor;
@end
View keybase.md

Keybase proof

I hereby claim:

  • I am mkubenka on github.
  • I am mkubenka (https://keybase.io/mkubenka) on keybase.
  • I have a public key whose fingerprint is A266 D582 D20B 551B 7036 07FD A4CC 8E62 F11A 5A99

To claim this, I am signing this object:

@mkubenka
mkubenka / install-parallel-centos-6.sh
Created Mar 24, 2017
Install GNU Parallel on CentOS 6
View install-parallel-centos-6.sh
#!/bin/bash
# Install GNU parallel on CentOS 6.
# http://software.opensuse.org//download.html?project=home%3Atange&package=parallel
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:tange/CentOS_CentOS-6/home:tange.repo
yum install parallel
# Alternative:
@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"
@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 / 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 \
You can’t perform that action at this time.