Skip to content

Instantly share code, notes, and snippets.

View andyrudoff's full-sized avatar

Andy Rudoff andyrudoff

  • Intel
  • Boulder, CO
View GitHub Profile
@andyrudoff
andyrudoff / README
Last active August 29, 2015 14:09
libpmem examples
This is a gist containing libpmem examples, so they can be embedded in web pages.
@andyrudoff
andyrudoff / README
Last active August 29, 2015 14:09
libpmemblk examples
This is a gist containing libpmemblk examples, so they can be embedded in web pages.
@andyrudoff
andyrudoff / README
Last active August 29, 2015 14:09
libpmemlog examples
This is a gist containing libpmemlog examples, so they can be embedded in web pages.
@andyrudoff
andyrudoff / README
Last active August 29, 2015 14:09
libpmemobj examples
This is a gist containing libpmemobj examples, so they can be embedded in web pages.
@andyrudoff
andyrudoff / README
Created November 17, 2014 04:52
libvmem examples
is a gist containing libvmem examples, so they can be embedded in web pages.
@andyrudoff
andyrudoff / OBJ_EXAMPLES.txt
Last active August 29, 2015 14:19
libpmemobj tutorial examples
Here are a sequence of examples used to introduce libpmemobj.
*.o
tester
tickle_me_elmo.so
@andyrudoff
andyrudoff / opendir_and_openat.c
Created January 11, 2019 20:53
trivial example showing how to use opendir+openat
/*
* opendir_and_openat.c -- trivial example showing how to use opendir+openat
*
* usage: a.out path-to-directory
*/
#include <stdio.h>
#include <dirent.h>
#include <err.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int
main(int argc, char *argv[])
#!/usr/bin/env python
#
# ww -- calculate the current Intel work week (which is slightly different than ISO week)
#
import datetime
def ww(d):
# find first day of ww 1 by finding Jan 1 of