Skip to content

Instantly share code, notes, and snippets.

View elmazzun's full-sized avatar

elmazzun elmazzun

View GitHub Profile
#include <sys/mman.h>
#include <unistd.h>
#include <sys/shm.h> /* shmat(), IPC_RMID */
#include <semaphore.h> /* sem_open(), sem_destroy(), sem_wait().. */
#include <fcntl.h> /* O_CREAT, O_EXEC */
#include <stdlib.h>
#include <iostream>
#include <map>
#include <string>
/***************** MAIN() *****************/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/socket.h>
@elmazzun
elmazzun / CurlSingletonExample.cpp
Last active December 14, 2021 16:58
Singleton example (C++11)
// Curl.hpp
#ifndef CURL_HPP
#define CURL_HPP
#include <iostream>
#include <curl/curl.h>
// This Singleton is NOT thread-safe (perdoname madre por mi vida loca)
class Curl {
@elmazzun
elmazzun / arch-install.txt
Last active December 1, 2023 19:30
Arch Linux installation
From a live USB
Assuming you are using EUFI
# ls /sys/firmware/efi/efivars
# iwctl
[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect SSID