Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am mcapell on github.
  • I am mcapell (https://keybase.io/mcapell) on keybase.
  • I have a public key ASBNgFf3ci3IW0NK-UU4xgPWJaxXKlXBWjD2yIMZnGWxNgo

To claim this, I am signing this object:

@mcapell
mcapell / rust-python-cffi.md
Created Dec 9, 2016 — forked from seanjensengrey/rust-python-cffi.md
Calling Rust from Python/PyPy using CFFI (C Foreign Function Interface)
View rust-python-cffi.md

This is a small demo of how to create a library in Rust and call it from Python (both CPython and PyPy) using the CFFI instead of ctypes.

Based on http://harkablog.com/calling-rust-from-c-and-python.html (dead) which used ctypes

CFFI is nice because:

  • Reads C declarations (parses headers)
  • Works in both CPython and PyPy (included with PyPy)
  • Lower call overhead than ctypes
@mcapell
mcapell / AndroidManifest.xml
Last active Aug 29, 2015 — forked from BrandonSmith/AndroidManifest.xml
Quick example of how to schedule a notification in the future using AlarmManager
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
@mcapell
mcapell / _.md
Last active Aug 29, 2015 — forked from klange/_.md
View _.md

Since this is on Hacker News...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later).
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • They're all while loops because shut up, you're overthinking a joke.
View keybase.md

Keybase proof

I hereby claim:

  • I am mcapell on github.
  • I am mcapell (https://keybase.io/mcapell) on keybase.
  • I have a public key whose fingerprint is 00B0 C2D2 D365 2A63 C5BC 695D 23CF CBF8 0A59 19A0

To claim this, I am signing this object:

@mcapell
mcapell / hack.sh
Created Jun 27, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#