Skip to content

Instantly share code, notes, and snippets.

View Kami's full-sized avatar
:octocat:
🐕‍🦺 🦮 🇸🇮 🇺🇦 🇹🇼

Tomaz Muraus Kami

:octocat:
🐕‍🦺 🦮 🇸🇮 🇺🇦 🇹🇼
View GitHub Profile

Keybase proof

I hereby claim:

  • I am Kami on github.
  • I am kami (https://keybase.io/kami) on keybase.
  • I have a public key whose fingerprint is 9978 28DC 62F7 59CE A189 D65E 2C07 54B2 CE06 92F3

To claim this, I am signing this object:

@Kami
Kami / gist:8732245
Created January 31, 2014 13:40
Reducing barriers to contribution to an Apache project

Apache Software Foundation is a well known and a well respected non-profit foundation.

Many people select an Apache project because they know they can expect a high quality, backed with a meritocratic community which will ensure a longevity and independence of the project.

Apache being a relatively large organization means that like many other large organizations a lot of things such as contributions involve additional processes and bureaucracy. A lot of people who have grown and got used to the Github work-flow shun upon those processes and consider Apache as rigid, slow and old school.

@Kami
Kami / generate_archives.rb
Last active December 31, 2015 18:59 — forked from stympy/generate_archives.rb
Note: This one works with Jekyll 1.4.1
# Jekyll archive page generator with pagination.
#
# Based on the category generator from
# http://recursive-design.com/projects/jekyll-plugins/,
# which is copyright (c) 2010 Dave Perrett,
# http://recursive-design.com/ and is licensed under the MIT
# license (http://www.opensource.org/licenses/mit-license.php), and
# on the pagination code from Jekyll itself.
#
# This code is copyright (c) 2011 Benjamin Curtis, and is licensed
kami ~/tmp $ wget http://www.apache.org/dist/libcloud/apache-libcloud-0.13.2.tar.gz
--2013-12-12 15:31:35-- http://www.apache.org/dist/libcloud/apache-libcloud-0.13.2.tar.gz
Resolving www.apache.org (www.apache.org)... 140.211.11.131, 192.87.106.229, 2001:610:1:80bc:192:87:106:229
Connecting to www.apache.org (www.apache.org)|140.211.11.131|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 504612 (493K) [application/x-gzip]
Saving to: `apache-libcloud-0.13.2.tar.gz'
100%[============================================================================================>] 504,612 185K/s in 2.7s w
@Kami
Kami / gist:7810989
Last active December 30, 2015 09:39
[RFC] Proposal for the SSH key pair management methods to be promoted to be a part of a base compute base in Libcloud
class NodeDriver(object):
# ...
def create_node(self, ..., key_pair_name=None):
"""
:param key_pair_name: Optional name of an existing key pair to use,
:type key_pair_name: ``str``
"""
pass
gcc -dM -E - <<<''
#define __DBL_MIN_EXP__ (-1021)
#define __UINT_LEAST16_MAX__ 65535
#define __FLT_MIN__ 1.17549435082228750797e-38F
#define __UINT_LEAST8_TYPE__ unsigned char
#define __INTMAX_C(c) c ## L
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 255
#define __WINT_MAX__ 4294967295U
#define __ORDER_LITTLE_ENDIAN__ 1234
read(757, "GET / HTTP/1.1\r\nHost: 192.168.1."..., 65536) = 150
gettimeofday({1385474195, 126105}, NULL) = 0
write(757, "HTTP/1.1 200 OK\r\nContent-Length:"..., 136) = 136
write(757, "Hello world\n", 12) = 12
read(756, "GET / HTTP/1.1\r\nHost: 192.168.1."..., 65536) = 150
gettimeofday({1385474195, 134257}, NULL) = 0
write(756, "HTTP/1.1 200 OK\r\nContent-Length:"..., 136) = 136
write(756, "Hello world\n", 12) = 12
read(759, "GET / HTTP/1.1\r\nHost: 192.168.1."..., 65536) = 150
gettimeofday({1385474195, 139666}, NULL) = 0
@Kami
Kami / rackspace_new_sizes.py
Created November 5, 2013 08:02
Note: This code currently only works with Libcloud trunk.
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='iad')
sizes = driver.list_sizes()
performance_sizes = [size for size in sizes if 'performance' in size.id]
#!/usr/bin/env bash
#
# Script for migrating from epydoc to Sphinx style docstrings.
#
# WARNING: THIS SCRIPT MODIFIES FILES IN PLACE. BE SURE TO BACKUP THEM BEFORE
# RUNNING IT.
DIRECTORY=$1
SED=`which gsed gnused sed`
[19:38] < ckrough> | hrm. the new default only applies to new disk images, so people using existing linux images will not see a
change in default behavioir
[19:39] < ckrough> | that makes me think this should *not* default to AUTO
[19:39] < ckrough> | the default should be whatever the image is defaulted to, but there needs to be a place to override that
[19:39] < Kami_> | ckrough: lemme check the docs again
[19:41] < Kami_> | On October 1st 2013, we will be adjusting the default Disk Partition option to Manual for our Linux base
images as part of our ongoing commitment to align with other OpenStack deployments and increase portability.
[19:41] < ckrough> | I created a server with manual and it had this tidbit in
it:https://gist.github.com/ckrough/6b1f4de4901fc7965f6c#file-gistfile1-txt-L20-L21
[19:41] < Kami_> | so it does sound like it will also apply to existing linux images