Skip to content

Instantly share code, notes, and snippets.

View fklassen's full-sized avatar

Fred Klassen fklassen

View GitHub Profile
@jeez
jeez / Scheduled Tx Tools
Last active May 8, 2024 12:15
[TSN] Scheduled Tx Tools - Examples and Helpers for testing SO_TXTIME, and the etf and taprio qdiscs
We couldn’t find that file to show.
@GuoJing
GuoJing / rbtree.c
Last active September 29, 2022 15:06
simple rbtree source code
#include <stdio.h>
#include <stdlib.h>
int BLACK = 0;
int RED = 1;
struct node {
struct node *left;
struct node *right;
struct node *parent;
@msteinert
msteinert / fake-erlang.sh
Created November 27, 2012 21:03 — forked from RJ/fake-erlang.sh
Use ESL erlang deb, provide fake erlang-nox package so deps behave
#!/bin/bash
# Install fake erlang packages, then the ESL package
# Afterwards, installing packages that depend on erlang, like rabbitmq,
# will use the ESL packaged erlang without installing the older disto ones
#
apt-get install equivs
# Create fake erlang packages, since we are using esl-erlang instead
cd /tmp
apt-get install -y equivs
@CocoaBeans
CocoaBeans / gdbinit
Created February 21, 2012 21:58
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net
@tmiz
tmiz / build_openssl_dylib.sh
Last active November 1, 2023 13:18
Build latest OpenSSL Universal Binary on OSX
#!/bin/bash
OPENSSL_VERSION="1.0.1g"
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386
@tonious
tonious / hash.c
Last active June 21, 2024 00:57
A quick hashtable implementation in c.
/* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101
* 2017-12-05
*
* -- T.
*/
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
@dchest
dchest / gist:574388
Created September 10, 2010 21:13
How to add a certificate from buffer in OpenSSL
X509 *cert;
char *zCert;
BIO *mem;
zCert = // get your certificate text buffer here (C string with certificate in PEM format)
mem = BIO_new(BIO_s_mem());
BIO_puts(mem, zCert);
cert = PEM_read_bio_X509(mem, NULL, 0, NULL);
free(zCert);
BIO_free(mem);