Skip to content

Instantly share code, notes, and snippets.

@noahbliss
noahbliss / kali-zshrc
Last active April 1, 2024 00:59
Kali's default zshrc
# ~/.zshrc file for zsh interactive shells.
# see /usr/share/doc/zsh/examples/zshrc for examples
setopt autocd # change directory just by typing its name
#setopt correct # auto correct mistakes
setopt interactivecomments # allow comments in interactive mode
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
setopt nonomatch # hide error message if there is no match for the pattern
setopt notify # report the status of background jobs immediately
setopt numericglobsort # sort filenames numerically when it makes sense
@noahbliss
noahbliss / pindriver-unexpected-high.rs
Last active November 23, 2023 19:29
pindriver-unexpected-high.rs
use hal::delay::Delay;
use hal::gpio::*;
use hal::peripherals::Peripherals;
fn main() -> anyhow::Result<()> {
hal::sys::link_patches();
let delay = Delay::new_default();
let peripherals = Peripherals::take()?;
@noahbliss
noahbliss / somegarbage.rs
Created November 22, 2023 19:07
cleaned up a bit
use async_executor::Executor;
//use async_executor::LocalExecutor;
//use edge_executor::Executor;
use futures_lite::future;
use hal::{gpio::*, peripherals::Peripherals, prelude::*, task::*, timer::*};
use std::thread;
use std::time;
fn main() -> anyhow::Result<()> {
hal::sys::link_patches();
@noahbliss
noahbliss / esp-hal-nostd.rs
Created November 22, 2023 18:24
esp-hal-nostd.rs
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
use embassy_executor::Spawner;
use embassy_time::{Duration, Timer};
use embedded_hal_async::digital::Wait;
use esp_backtrace as _;
use hal::{
clock::ClockControl,
@noahbliss
noahbliss / proxprep.sh
Last active September 15, 2023 01:31
Proxmox Setup for General Dev Use
# Swap to free repo
wget -qO- https://gitlab.com/shebang/bashengine/raw/master/root/proxmox/aptfix | bash
apt update
apt upgrade -y
apt dist-upgrade -y
# Remove Nag. (Needs to be done after most upgrades that impact pve-manager)
cat <<EOF > /etc/apt/apt.conf.d/80pvenagfix
@noahbliss
noahbliss / ztrepo.sh
Created August 2, 2019 20:56
Patched zerotier installer for kali linux
#!/bin/bash
<<ENDOFSIGSTART=
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
ENDOFSIGSTART=
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
#
@noahbliss
noahbliss / .bashrc
Created June 22, 2022 13:51
Minimalistish .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@noahbliss
noahbliss / dattormm.yml
Created February 11, 2022 17:38
Datto RMM API Token Fetch
POST /auth/oauth/token HTTP/2
Host: zinfandel-api.centrastage.net
Content-Type: application/x-www-form-urlencoded
Authorization: Basic cHVibGljLWNsaWVudDpwdWJsaWM=
Content-Length: ###
grant_type=password&username=APIIDKEY&password=APISECRETKEY
@noahbliss
noahbliss / hxagent_linux_install.sh
Last active September 29, 2021 18:39
HX Agent Linux Distribution Conditional Installer
#!/usr/bin/env bash
# Noah Bliss - 2021.09.29
if [ -f /etc/os-release ]; then source /etc/os-release; else echo "os-release missing or not Linux" && exit 1; fi
tgzfile="IMAGE_HX_AGENT_LINUX_32.30.16.tgz"
debfile="xagt_32.30.16-1.ubuntu16_amd64.deb"
rpmfile="xagt-32.30.16-1.el7.x86_64.rpm"
mkdir hxagent
@noahbliss
noahbliss / unstableaptpriorityset.sh
Last active May 18, 2021 15:31
Debian APT Priority w/ Security Updates
# Taken from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725934
# https://git.io/Jsgoj <- short url for this as raw
apt-get install debsecan
echo "Compare these sources.list files and implement...creating: /etc/apt/sources.list.new"
cat <<'EOF' > /etc/apt/sources.list.new
# Testing
deb http://deb.debian.org/debian/ testing main contrib non-free
deb-src http://deb.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org/debian-security testing-security main contrib non-free