Profile

Cover photo
5 followers|16,692 views
AboutPostsPhotosVideos

Stream

funcptr

Shared publicly  - 
 
Today is a twofer today... two for the price of one, another quick article on how to get build numbers into your C/C++ binaries when using waf.

http://funcptr.net/2014/06/10/build-numbers-in-binaries-using-waf/
def try_git_version(): import os import sys version = None try: version = os.popen('git describe --always --dirty --long').read().strip() except Exception as e: print e return version. It runs git describe --always --dirty --long which will return something along these lines: 401b85f-dirty .
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
Friend and colleague +Scott Sturdivant just wrote an excellent article on how to use portshaker and poudriere together on #FreeBSD  to allow you to easily build and maintain custom ports that are not in the default ports tree and build packages for them!

Check it out: http://funcptr.net/2013/12/11/building-custom-ports-with-poudriere-and-portshaker/
Some key points here are that the two items listed in for the default_merge_from argument need to have scripts present in the /usr/local/etc/portshaker.d directory. Further more, the combination of the poudriere_ports_mountpoint and default_poudriere_tree needs to be a ports tree that is then ...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
As a follow-up to my previous post it is now documented how to embed #ZeroMQ within #libev.

http://funcptr.net/2013/04/20/embedding-zeromq-in-the-libev-event-loop/
int zevents = 0; size_t zevents_len = sizeof(zevents); zmq_socket.getsockopt(ZMQ_EVENTS, &zevents, &zevents_len); do { if (zevents & ZMQ_POLLIN) { // We can read from the ZeroMQ socket } e...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
Been a busy day today, mostly upgrading from FreeBSD 8.2-RELEASE to FreeBSD 9.0-RELEASE and re-installing all the appropriate software as required.

Since I am running FreeBSD with ZFS on root there are couple gotcha's that I had to watch out for during my upgrade, so I made sure to document them in the latest entry to the technical notebook!

http://funcptr.net/2012/04/24/freebsd-8.2-to-9.0-update-with-zfs-on-root-(mirror)/
Wanting to take advantage of some of the advancements made in FreeBSD 9.0-RELEASE such as the updated ZFS, a bug that was fixed that stopped jails from owning a ZFS file system, improved dtrace, and b...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
http://funcptr.net/2012/04/08/openssl-as-a-filter-(or-non-blocking-openssl)/

New blog post out (as of two days ago, just got around to uploading it). This is a trick I found online on how to use OpenSSL as a filter. This allows one to easily hook OpenSSL into an event library, such as for example libev.

The code sample is written in C++, but it should be fairly simple to translate it into C if so desired. If you have any questions feel free to post here!
The code is very new and might still be buggy, but it outlines the principles: use a memory stream, which will avoid all issues with blocking in openssl. It shows the idea pretty clearly but unless yo...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
Just posted a new article about converting from KVM based virtual machine images to VirtualBox based virtual machine images due to a client requirement:

http://funcptr.net/2012/04/01/converting-kvm-virtual-machines-to-virtualbox
After this, unfortunately, there is no way to to automatically convert over the settings that the virtual machine had, such as the network cards, the memory allocations and hard drive settings. You wi...
1
1
Bert JW Regeer's profile photo
Add a comment...
In their circles
5 people
Have them in circles
5 people
lenny luo's profile photo

funcptr

Shared publicly  - 
 
It's been a long time coming, but it is finally here... a follow-up to my last post regarding what you should and should not store in a session.

This time we are covering how to store the session ID in a cookie, and how to tamper proof the cookie so that a malicious user can not modify it.

http://funcptr.net/2014/06/10/tamper-proof-session-cookies-and-session-storage/
Easily expire sessions. The upside to server-side storage is that it is possible for us to very easily expire a session, simply remove the associated file/data that is stored and the users session has now become invalid. Client-side storage. The other method that has recently started ...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
There is a significant lack of information on what you should/shouldn't store inside of a users session, hopefully this article can help clear up some of the misconceptions, and how to make sites more secure.

http://funcptr.net/2013/08/25/user-sessions,-what-data-should-be-stored-where-/
13:05 25 Aug 2013 · User sessions, what data should be stored where? A couple of days ago on reddit.com's /r/netsec a poster by the name of Dan Weber posted what he believed to be an attack on PHP sessions: Hacking PHP sessions by running out of memory (reddit link). The way the "attack" works ...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
I was doing some work on embedding #ZeroMQ within another event loop, more specifically the libev event loop and wanted to document some of my findings as well as explain the difference between edge and level triggered events.

http://funcptr.net/2012/09/10/zeromq---edge-triggered-notification/

Looking forward to feedback on the article, and hopefully those of you also implementing software with ZeroMQ will have another resource!
This file descriptor can then be passed on to poll() , select() , kqueue() or whatever your event notification library of choice may be, the idea being that if the file descriptor is notified to be av...
1
1
Bert JW Regeer's profile photo
Add a comment...

funcptr

Shared publicly  - 
 
Little projects like this are absolutely fantastic, and the end result is awesome!
 
Average all of the fonts on your computer and what will you get? Most likely not a whole lot, but take it one step further and do some math and you may get something similar to this guy:

http://iotic.com/averia/

Very, very cool project. Love the look of the font, and the thought process and idea behind it is fantastic.
1
Add a comment...

funcptr

Shared publicly  - 
 
Just updated the http://funcptr.net/ website with an updated style/layout. This moves the header to the top of the page as a stand alone rather than in the side bar fixing some issues that were showing up on iOS when the page was viewed on an iPhone.

Other changes include the addition of social media buttons, they are located extremely unobtrusively at the bottom of the page after the full post, and if people are so inclined are easily blocked with adblock by blocking div.#social.

Looking forward to hearing what you all think!
<div class="codehilite"><pre><span class="k">def</span> <span class="nf">function</span><span class="p">(</span>...
1
1
Bert JW Regeer's profile photo
Add a comment...
People
In their circles
5 people
Have them in circles
5 people
lenny luo's profile photo
Story
Tagline
typedef void (*funcptr)(char *, int)