Skip to content

Instantly share code, notes, and snippets.

View koyedele's full-sized avatar

Kunle Oyedele koyedele

View GitHub Profile

Keybase proof

I hereby claim:

  • I am koyedele on github.
  • I am kunleoyedele (https://keybase.io/kunleoyedele) on keybase.
  • I have a public key ASDePyCRVOlRWFXFp-QdCQ7PZk4fCqDXe1LHRZp9f6t-ywo

To claim this, I am signing this object:

@koyedele
koyedele / data_alignment.c
Last active April 15, 2020 03:50
A simple program that shows the effect of word alignment on the performance of programs.
/**
* File: data_alignment.c
* This is a collection of simple functions that attempt to read
* from a 5MB file in varying sizes and with different buffer
* alignments.
*
* The munge* functions are derived from Jonathan Rentzsch's article
* https://www.ibm.com/developerworks/library/pa-dalign/
*
* This work is inspired by the same article referenced above.
@koyedele
koyedele / Learning Rust
Last active March 2, 2016 07:29
Learning Rust
Key idea #1: Variable bindings in Rust "have ownership" of what they're bound to.
let x = 5; // 'x' "OWNS" the value 5
let v = vec![1,2,3,4,5]; // 'v' "OWNS" the vector datastructure which contains the values '1,2,3,4,5'
Ownership is a serious matter - even functions "own" their parameters, so this WILL NOT compile:
fn main() {
fn somefunc(x: i32, v: Vec<i32>) -> i32 {
// somefunc "owns" x and v once they are bound as parameters
12
}
@koyedele
koyedele / migrate-postgres-9.4-to-9.5.txt
Last active February 17, 2016 04:58
Upgrade Postgres 9.4 to 9.5 (Homebrew)
These instructions are taken from: Keita's Blog - https://kkob.us/2016/01/09/homebrew-and-postgresql-9-5/
1. Turn PostgreSQL off first, just in case:
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. Update PostgreSQL itself:
$ brew update && brew upgrade postgresql
3. Make a new, pristine 9.5 database:
$ initdb /usr/local/var/postgres9.5 -E utf8
@koyedele
koyedele / gist:732532d3af6d59a96773
Created February 10, 2016 07:27 — forked from g3d/gist:2709563
Clean Install – OS X 10.11 El Capitan
@koyedele
koyedele / setup-krb-users-and-keytabs.py
Created February 1, 2016 08:08
Simple script for generating Kerberos principals and keytabs from the Ambari host-keytab CSV file
#!/usr/bin/env python
# File: setup-krb-users-and-keytabs.py
#
# This is a simple script that will handle the creation of principals on
# the KDC, the creation of keytabs with appropriate permissions, and
# the copying of keytabs to the appropriate locations. It's input is the
# host-principal-keytab-list file that Ambari generates.
#
# This script MUST be run as root on the KDC node.
#