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 / 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
@okoye
okoye / authenticate.py
Created September 18, 2013 04:54
sample jira python oauthentication demostration. showing two ways to access the jira api using python 2.6 (dance0) and python 2.7 (dance1)
'''
sample code to demonstrate using JIRA's oauth API
'''
from rauth.session import OAuth1Session
from rauth.oauth import RsaSha1Signature
from Crypto.PublicKey import RSA
from Crypto.Hash import MD5
from Crypto import Random
from jira.client import JIRA
@okoye
okoye / configuration.txt
Created September 18, 2013 04:52
jira python oauth configuration
access_token=LaOkR40QmYiYoS1eF2GwDPk64c6ONkFM
access_token_secret=T1cfl2tPfoy7oU1whloQUgELcIsTyMlm
consumer_key=hardcoded-consumer
consumer_secret=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxZDzGUGk6rElyPm0iOua0lWg84nOlhQN1gmTFTIu5WFyQFHZF6OA4HX7xATttQZ6N21yKMakuNdRvEudyN/coUqe89r3Ae+rkEIn4tCxGpJWX205xVF3Cgsn8ICj6dLUFQPiWXouoZ7HG0sPKhCLXXOvUXmekivtyx4bxVFD9Zy4SQ7IHTx0V0pZYGc6r1gF0LqRmGVQDaQSbivigH4mlVwoAO9Tfccf+V00hYuSvntU+B1ZygMw2rAFLezJmnftTxPuehqWu9xS5NVsPsWgBL7LOi3oY8lhzOYjbMKDWM6zUtpOmWJA52cVJW6zwxCxE28/592IARxlJcq14tjwYwIDAQAB
url=https://ecomjira.wsgc.com/rest/api/2/application-properties