Skip to content

Instantly share code, notes, and snippets.

View okoye's full-sized avatar
🇳🇬
I may be slow to respond.

Chuka Okoye okoye

🇳🇬
I may be slow to respond.
View GitHub Profile
@okoye
okoye / run1
Created September 22, 2017 05:26
CMCDH Debugging
==> amazon-ebs: Prevalidating AMI Name...
amazon-ebs: Found Image ID: ami-4543be3d
==> amazon-ebs: Creating temporary keypair: packer_59c49ca9-0a3c-2b23-c514-5dd39884a650
==> amazon-ebs: Creating temporary security group for this instance: packer_59c49cab-e504-77e0-41a4-9e5231e00244
==> amazon-ebs: Authorizing access to port 22 on the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Adding tags to source instance
amazon-ebs: Adding tag: "Name": "Packer Builder"
amazon-ebs: Instance ID: i-0e425b2de2a239fcf
==> amazon-ebs: Waiting for instance (i-0e425b2de2a239fcf) to become ready...
@okoye
okoye / ena.ko
Created September 19, 2017 21:22
Compile kernel module
DKMS make.log for ena-1.2.0 for kernel 3.10.0-327.10.1.el7.x86_64 (x86_64)
Tue Sep 19 21:20:51 UTC 2017
make: Entering directory `/var/lib/dkms/ena/1.2.0/build/kernel/linux/ena'
make -C /lib/modules/3.10.0-327.10.1.el7.x86_64/build M=/var/lib/dkms/ena/1.2.0/build/kernel/linux/ena modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-693.2.2.el7.x86_64'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
CC [M] /var/lib/dkms/ena/1.2.0/build/kernel/linux/ena/ena_netdev.o
In file included from /var/lib/dkms/ena/1.2.0/build/kernel/linux/ena/ena_netdev.h:44:0,
from /var/lib/dkms/ena/1.2.0/build/kernel/linux/ena/ena_netdev.c:53:
/var/lib/dkms/ena/1.2.0/build/kernel/linux/ena/kcompat.h:424:6: error: nested redefinition of ‘enum pkt_hash_types’
@okoye
okoye / install_caffe.sh
Created April 12, 2017 02:15 — forked from doctorpangloss/install_caffe.sh
Installing Caffe on Mac 10.11.5 and later in the 10.11 series, and 10.12.1 and later in the 10.12 series
#!/bin/sh
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Apple hides old versions of stuff at https://developer.apple.com/download/more/
# Install the latest XCode (8.0).
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew.
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after
# you have installed caffe.
# Install CUDA toolkit 8.0 release candidate
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download
@okoye
okoye / gist:7a6c799ab5df36780de697797f5001fb
Created February 3, 2017 21:16 — forked from ttomsu/gist:2668256021c0b9a9213200004cb83acb
Using OpenSSL to generate and sign Server and Client SSL certificates
# Create keys
openssl genrsa -des3 -out ca.key 4096
openssl genrsa -des3 -out server.key 4096
openssl genrsa -des3 -out client.key 4096
# Self-sign CA certificate
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# Generate server and client certificate signing requets
openssl req -new -key server.key -out server.csr
Showtimes Results
Results
[{
    "tmsId": "MV007327660000",
    "rootId": "11597968",
    "subType": "Feature Film",
    "title": "Rogue One: A Star Wars Story",
    "releaseYear": 2016,

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@okoye
okoye / throttle 1
Created August 11, 2016 21:32
AWS Throttle Logs
2016-08-11 20:12:38.939 ERROR 929 --- [ol-11-thread-10] c.n.s.c.o.DefaultOrchestrationProcessor : com.amazonaws.AmazonServiceException: Request limit exceeded. (Service: AmazonEC2; Status Code: 503; Error Code: RequestLimitExceeded; Request ID: 368563fd-b527-47fa-bc33-955e0b1c1b20)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1389)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:902)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:607)
at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:376)
at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:338)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:287)
at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11133)
at com.amazonaws.services.ec2.AmazonEC2Client.describeImages(AmazonEC2Client.java:5106)
at com.amazonaws.services.ec2.AmazonEC2$describeImages$11.call(Unknown Source)
@okoye
okoye / subset-sum
Created August 10, 2014 22:21
python solution to the subset-sum problem. A bruteforce approach
def subsetsum(numbers, target):
size = 1
subsets = []
while size <= len(numbers):
for combination in combinations(numbers, size):
if sum(combination) == target:
subsets.append(combination)
size += 1
return subsets
@okoye
okoye / subset-sum
Created August 10, 2014 21:53
A pseudocode implementation of the bruteforce approach to a subset-sum problem
Input: List numbers, Integer target
Output: List solution
ofSize = 1 #size of combination to generate
while ofSize <= numbers.size:
for each combination in possibleCombinations(numbers, ofSize):
if sum(combination) == target:
return combination
ofSize++
@okoye
okoye / requirements.txt
Created September 18, 2013 04:56
list of required python packages that must be installed for this to work.
rauth
PyCrypto
jira-python