Skip to content

Instantly share code, notes, and snippets.

@mkubenka
mkubenka / isohybrid.pl
Created November 21, 2018 09:51 — forked from jsarenik/isohybrid.pl
isohybrid.pl from Syslinux-6.03
#!/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
@mkubenka
mkubenka / accountid_boto3.py
Created January 27, 2016 20:36 — forked from Ashex/accountid_boto3.py
Get Account ID from boto3 via IAM or Role ARN
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 / gist:b4324b553a7fad89e29c
Created October 28, 2015 14:38 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

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
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use File::Basename;
#---------------------------------------------------------------------
@mkubenka
mkubenka / NSString+KBAdditions.h
Last active March 16, 2016 11:29 — forked from kevboh/NSString+KBAdditions.h
Add support for iOS7.
@interface NSString (KBAdditions)
- (CGFloat)fontSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size minimumScaleFactor:(CGFloat)minimumScaleFactor;
@end
@mkubenka
mkubenka / zram
Last active August 29, 2015 13:59 — forked from janlam7/zram
#!/bin/bash
# -*- sh -*-
: << =cut
=head1 NAME
zram - Plugin to monitor zram usage
=head1 CONFIGURATION
@mkubenka
mkubenka / api.py
Created March 12, 2013 11:52 — forked from marteinn/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):