Skip to content

Instantly share code, notes, and snippets.

View mohsenomidi's full-sized avatar
🎯
Focusing

Mohsen mohsenomidi

🎯
Focusing
View GitHub Profile
@caiorss
caiorss / linux-info.cpp
Created October 10, 2020 20:43
Sample C++ code for getting system info via virtual file system
/* Summary: Gets Linux runtime information from VSF virtual file system.
*
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iomanip> // std::seprecision, std::fixed
// See: https://man7.org/linux/man-pages/man2/sysinfo.2.html
@kristopherjohnson
kristopherjohnson / Makefile
Last active January 7, 2020 13:44
Handling SIGHUP, SIGUSR1, and SIGUSR2 signals in a multithreaded C++ program
CXXFLAGS=-std=c++11
sigtest: sigtest.cpp
@syzdek
syzdek / ldapsearch-async.c
Created December 13, 2011 02:41
an example of an LDAP asynchronous search using an LDAP API
/*
* Simple Programming Examples And References
* Copyright (C) 2011 David M. Syzdek <david@syzdek.net>.
*
* @SYZDEK_BSD_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*