Skip to content

Instantly share code, notes, and snippets.

View dmgolembiowski's full-sized avatar

David M. Golembiowski dmgolembiowski

View GitHub Profile

Setup tor proxy on Arch Linux

Copied from this article.

Installation

  1. Install tor

         $ sudo pacman -S tor
         $ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.

$ sudo pacman -S nyx

@dmgolembiowski
dmgolembiowski / VR_roadmap.md
Created October 21, 2024 19:50 — forked from tin-z/VR_roadmap.md
Becoming a Vulnerability Researcher roadmap: my personal experience
@dmgolembiowski
dmgolembiowski / hax.c
Created October 21, 2024 19:19 — forked from apsun/hax.c
Hook main() using LD_PRELOAD
/*
* Hook main() using LD_PRELOAD, because why not?
* Obviously, this code is not portable. Use at your own risk.
*
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl'
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out'
*/
#define _GNU_SOURCE
#include <stdio.h>
To From Method
string of code literal code std::stringify!{}
string of code syntax tree !quote(#syntax_tree).to_string()
string of code TokenStream .to_string()
string of syntax literal code format!("{:?}",parse2::<SynType>(quote! {...}).expect(...)
string of syntax syntax tree format!("{:?}"),…), format!("{:#?}"),…)
string of tokens literal code format!("{:?}",quote! {...})
string of tokens TokenStream format!("{:?}"),…), format!("{:#?}"),…)
syn::Error TokenStream .to_compile_error() [see Rule #7]
syntax tree literal code parse_quote!(…)
@dmgolembiowski
dmgolembiowski / build.rs
Created July 27, 2023 18:26 — forked from Ciantic/build.rs
Some in-memory stuff I threw away
use std::io::Write;
use std::{env, path::Path};
use std::{fs::OpenOptions, path::PathBuf};
use regex::Regex;
fn main() {
let dir = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()).join("lib");
println!("cargo:rustc-link-search=native={}", dir.display());
@dmgolembiowski
dmgolembiowski / pi3_browser-only.md
Created June 17, 2023 00:00 — forked from bheisig/pi3_browser-only.md
Run Raspberry 3 in digital signage mode with Chromium Web browser on a TV screen
@dmgolembiowski
dmgolembiowski / camp.py
Created April 5, 2023 19:07 — forked from marskar/camp.py
CAMP stands for git commit --add --message && git push
import git
repo = git.Repo()
changed_file_lists = [
[file.a_path
for file in repo.index.diff(None).iter_change_type(change_type)]
for change_type in ('D', 'M')
]

Fedora

Setup a Separate Boot Device

device=/dev/sda
sudo wipefs --all $device
sudo dd if=/dev/zero of=$device bs=102400 count=2000
sudo parted $device --script mklabel gpt
sudo parted --script $device mkpart --align optimal efi fat32 4MiB 1GiB

Kubernetes hybrid cluster (Linux+Windows) on Hyper-V with local subnet and internet access

Prepare Host

Install CLI utils on your host machine

Kubectl

Helm