Skip to content

Instantly share code, notes, and snippets.

View abel0b's full-sized avatar
🐉
Compiling

Abel Calluaud abel0b

🐉
Compiling
  • Voie lactée
View GitHub Profile
function makee() {
make $@ 2>&1 | grep -v AVERTISSEMENT
}
@abel0b
abel0b / encryption.md
Created January 15, 2020 20:05
File encryption on linux

With openssl

Encryption

openssl aes-256-cbc -in attack-plan.txt -out message.enc

Decryption:

openssl aes-256-cbc -d -in message.enc -out plain-text.txt
@abel0b
abel0b / nginx.conf
Created January 16, 2020 17:22
nginx + TLS + docker
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@abel0b
abel0b / gpu.md
Created January 18, 2020 19:35
Get GPU info on linux

Get OpenGL information for the graphics processor

glxinfo
lscpi
lspci | grep VGA
@abel0b
abel0b / slug.sh
Created January 19, 2020 09:16
Create human-readable url slug in bash
function slug() {
echo "$1" | sed "s/\s/-/g" | tr "[:upper:]" "[:lower:]"
}
slug "Hello World!"
@abel0b
abel0b / main.cpp
Created January 20, 2020 12:25
C++ pre-increment vs post-increment
#include <vector>
#include <chrono>
#include <iostream>
using namespace std;
int main() {
int n = 1000000;
int value = 42;
vector<int> vec(n, value);
@abel0b
abel0b / main.c
Created February 1, 2020 16:10
calculcate power 3/2
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#define N 1000000
// Compare 3/2 power calculation
@abel0b
abel0b / ufw-glusterfs.conf
Last active February 21, 2020 12:34 — forked from Diftraku/ufw-glusterfs.conf
UFW Application Profile for GlusterFS
[GlusterFS Daemon]
title=GlusterFS (Daemon)
description=GlusterFS Daemon
ports=24007/tcp
[GlusterFS Management]
title=GlusterFS (Management)
description=GlusterFS Management
ports=24008/tcp
@abel0b
abel0b / ufw-docker-swarm.conf
Created February 24, 2020 10:25
UFW Application Profile for Docker Swarm
[Docker Swarm]
title=Docker Swarm
description=Docker Swarm
ports=2377/udp|7946/tcp|7946/udp|4789/udp
@abel0b
abel0b / glfw-starter.c
Created April 1, 2020 13:27
glfw stater template
#include <GLFW/glfw3.h>
int main(void)
{
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())
return -1;