Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
struct foo {
char bytes[1024];
};
int main() {
struct foo* ptr;
printf("sizeof ptr = %lu\n", sizeof ptr); // 8
@Richard-W
Richard-W / asyncqueue.hpp
Created July 23, 2015 17:15
A thread safe queue that blocks pop when no elements are available
/* Copyright 2015, Richard Wiedenhöft <richard@wiedenhoeft.xyz>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@Richard-W
Richard-W / hashmap.c
Created March 15, 2014 15:04
Implementation of a hash map in C.
/* Copyright (C) 2014 Richard Wiedenhöft <richard.wiedenhoeft@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
@Richard-W
Richard-W / finalterm-9999.ebuild
Created June 20, 2013 07:37
An ebuild for installation of finalterm on Gentoo-Linux
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit cmake-utils gnome2-utils
DESCRIPTION="At last – a modern terminal emulator."
HOMEPAGE="https://github.com/p-e-w/finalterm"
SRC_URI=""