Skip to content

Instantly share code, notes, and snippets.

View shizonic's full-sized avatar
💭
[ -n "$problems" ] && solve || chill

shizonic shizonic

💭
[ -n "$problems" ] && solve || chill
View GitHub Profile
@shizonic
shizonic / config
Created November 14, 2022 20:31 — forked from miguelmota/config
Arch linux VNC server setup
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared

Rust Cheat Sheet

Variables & Mutability

Variables are immutable by default. This makes Rust safer and makes concurrency easier.
Immutable means once a value is bound to that variable, it cannot be changed.
For example:

fn main() {
 let x = 5;
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Simple Transactional Email</title>
<style>
/* -------------------------------------
GLOBAL RESETS
------------------------------------- */
@shizonic
shizonic / README.md
Created December 29, 2021 06:54 — forked from e-minguez/README.md
docker on lxc on turris omnia

Turris

opkg install kmod-veth
opkg install kmod-ipt-extra
opkg install iptables-mod-extra
  • Install a new container (I created an arch linux container)
  • Open up the /srv/lxc/containername/config file for editing:
@shizonic
shizonic / log4j_rce_detection.md
Created December 14, 2021 07:08 — forked from Neo23x0/log4j_rce_detection.md
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@shizonic
shizonic / answerfile
Created November 4, 2021 05:28 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@shizonic
shizonic / de-anarchy.sh
Created October 23, 2021 05:04 — forked from GloriousEggroll/de-anarchy.sh
A quick bash script to remove anarchy linux branding post-install
#!/bin/bash
sed -i -e 's/Anarchy/Arch/g' /etc/lsb-release
sed -i -e 's/Anarchy/Arch/g' /etc/os-release
sed -i -e 's/anarchy/arch/g' /etc/os-release
sed -i -e 's/arch-linux/www.archlinux/g' /etc/os-release
echo 'SUPPORT_URL="https://bbs.archlinux.org/"' >> /etc/os-release
echo 'BUG_REPORT_URL="https://bugs.archlinux.org/"' >> /etc/os-release
cp /etc/os-release /usr/lib/os-release
head -n -2 /etc/lightdm/lightdm-gtk-greeter.conf > lightdm-gtk-greeter.conf
mv lightdm-gtk-greeter.conf /etc/lightdm/
@shizonic
shizonic / README.md
Created August 14, 2021 14:39 — forked from matusnovak/README.md
Matrix (Synapse + Riot) in Docker with Traefik and federation

Matrix

matrix.org chat is split into two parts, the server and the client. The server we are going to use is called Synapse and the client is Riot.im. The Synapse will also need Postgres database and Redis for caching.

0. Folders

Make sure your folder structure looks like this.

example/
@shizonic
shizonic / escape.js
Created July 26, 2021 20:27 — forked from jcreedcmu/escape.js
Escaping nodejs vm
////////
// The vm module lets you run a string containing javascript code 'in
// a sandbox', where you specify a context of global variables that
// exist for the duration of its execution. This works more or less
// well, and if you're in control of the code that's running, and you
// have a reasonable protocol in mind// for how it expects a certain
// context to exist and interacts with it --- like, maybe a plug-in
// API for a program, with some endpoints defined for it that do
// useful domain-specific things --- your life can go smoothly.