Skip to content

Instantly share code, notes, and snippets.

View helloimalemur's full-sized avatar
🦊

Koonts helloimalemur

🦊
View GitHub Profile
@helloimalemur
helloimalemur / openssl_commands.md
Created April 22, 2024 16:57 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@helloimalemur
helloimalemur / mac-linux-nfs.md
Last active December 18, 2023 23:34 — forked from betweenbrain/mac-linux-nfs.md
Mac backup to Linux NFS via Time Machine

Server

apt update
apt install nfs-kernel-server
mkdir /mnt/nfs -p
chown nobody:nogroup /mnt/nfs
chmod 777 /mnt/nfs
nano /etc/exports
@helloimalemur
helloimalemur / gdb_cheat_sheet.txt
Created November 30, 2023 20:49
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object
@helloimalemur
helloimalemur / interfaces
Created August 22, 2023 14:59 — forked from kernelsmith/interfaces
example etc/network/interfaces config
# always start with interface up
auth eth0
# Static
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameservers 192.168.1.250
@helloimalemur
helloimalemur / rocket-sqlx.rs
Created July 3, 2023 15:18 — forked from hendi/rocket-sqlx.rs
Rust: rocket with sqlx
#[macro_use] extern crate rocket;
use std::env;
use anyhow::Result;
use rocket::State;
use rocket::http::Status;
use sqlx::{Pool, Postgres};
@helloimalemur
helloimalemur / dumprequest.php
Created February 1, 2023 17:18 — forked from magnetikonline/dumprequest.php
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']
@helloimalemur
helloimalemur / example.cs
Created January 22, 2023 13:41 — forked from brandonmwest/example.cs
Generating base64-encoded Authorization headers in a variety of languages
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", username, password))));

General OpenSSL Commands

These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
@helloimalemur
helloimalemur / pgp.md
Last active December 13, 2022 14:23 — forked from spencerdodd/pgp.md
pgp file encryption / decryption with GPG

generate new key-pair

gpg --full-generate-key #If you are not on version 2.1.17 or greater, the gpg --full-generate-key command doesn't work.
gpg --default-new-key-algo rsa4096 --gen-key

list keys

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH