Skip to content

Instantly share code, notes, and snippets.

✍️
Busy writing bugs

Ronie Martinez roniemartinez

✍️
Busy writing bugs
Block or report user

Report or block roniemartinez

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
@roniemartinez
roniemartinez / intlist.pyx
Created Dec 27, 2017 — forked from vchahun/intlist.pyx
Shared memory with Cython
View intlist.pyx
from libc.stdio cimport FILE, fopen, fwrite, fclose
from libc.stdlib cimport malloc
from posix.fcntl cimport open, O_RDONLY
from posix.unistd cimport close, read, off_t
cdef extern from "sys/mman.h":
void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset)
enum:
PROT_READ
MAP_FILE
@roniemartinez
roniemartinez / mapread.c
Created Dec 27, 2017 — forked from marcetcheverry/mapread.c
mmap and read/write string to file
View mapread.c
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
int main(int argc, const char *argv[])
{
@roniemartinez
roniemartinez / tun-ping-win.py
Created Oct 25, 2017 — forked from glacjay/tun-ping-win.py
Reading/Writing OpenVPN's TUN/TAP Device under Windows using Python.
View tun-ping-win.py
import _winreg as reg
import win32file
adapter_key = r'SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
def get_device_guid():
with reg.OpenKey(reg.HKEY_LOCAL_MACHINE, adapter_key) as adapters:
try:
View arrow_pattern.py
# http://www.tutorialgear.com/python-print-arrow-head-with-asterisks/
n = input("Enter length to print pattern for : ")
for i in range(n) + list(reversed(range(n-1))):
print " " * i + "*"
@roniemartinez
roniemartinez / Box2D
Created Feb 19, 2013
Compile output from building Box2D using Qt Creator
View Box2D
02:06:08: Running steps for project Box2D...
02:06:08: Starting: "C:\QtCreator\qt-creator-2.6.0\bin\jom.exe"
jom 1.0.12 - empower your cores
Scanning dependencies of target Box2D
[ 0%] Building CXX object Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2DistanceJoint.cpp.obj
[ 1%] b2DistanceJoint.cpp
Building CXX object Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2FrictionJoint.cpp.obj
b2FrictionJoint.cpp
You can’t perform that action at this time.