Skip to content

Instantly share code, notes, and snippets.

:octocat:
💯

David J. Felix DavidJFelix

:octocat:
💯
Block or report user

Report or block DavidJFelix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am davidjfelix on github.
  • I am davidjfelix (https://keybase.io/davidjfelix) on keybase.
  • I have a public key ASBXhkpcdJ6o4vmyZRI1p7PDZK1XXL82RZB2iks6U7RNqQo

To claim this, I am signing this object:

View install.sh
#!/bin/bash
set -euvxo pipefail
# Get commande line tools
xcode-select --install
# Get homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
View java.pp
class java {
class { 'apt': }
# Add PPA
apt::ppa { 'ppa:webupd8team/java': } ->
# Install Java
package { 'oracle-java7-installer':
ensure => latest,
require => [
Apt::Ppa['ppa:webupd8team/java'],
Exec['accept_java7_license'],
@DavidJFelix
DavidJFelix / HyperLogLogs_lab.md
Last active May 20, 2019
A lab for HyperLogLogs using Redis & Python, created with Ipython notebook
View HyperLogLogs_lab.md

Redis is an in-memory network key/value store and nltk is the python natural language toolkit. We'll be using these libraries later for the lab.

    import redis
    import nltk

Setup our redis connection. It's on the VM, so local is fine.

@DavidJFelix
DavidJFelix / ugly_json.json
Last active Aug 29, 2015
JSON to JSONx to JSHOL
View ugly_json.json
{"json:object":{
"xsi:schemaLocation": "http://www.datapower.com/schemas/json jsonx.xsd",
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"xmlns:json": "http://www.ibm.com/xmlns/prod/2009/jsonx",
"content":[
{"json:string":{
"name": "name",
"content": "John Smith"
}},
{"json:object": {
@DavidJFelix
DavidJFelix / 4equals5.py
Created Jul 26, 2014
Modify python behavior
View 4equals5.py
from ctypes import c_int8
from struct import calcsize
# Make 4 = 5
c_int8.from_address(id(4) + calcsize('PP')).value = 5
# A little more readable
address = id(4)
offset = calcsize('PP')
You can’t perform that action at this time.