Skip to content

Instantly share code, notes, and snippets.

View Staubgeborener's full-sized avatar
:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";

Staubgeborener

:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";
View GitHub Profile
@jakelogemann
jakelogemann / check-port-conns
Created June 9, 2014 21:30
Check Connections To Port
#!/bin/bash
# Lists connections on a given port, defaults to 80
PORT=${1:-80}
clear
while x=0; do
clear;
echo "Connections to $HOSTNAME:$PORT"
echo "[Updated: $(date)]";
echo "==============================";
#!/bin/bash
#Simple script for VirtuaBox memory extraction
# Usage: vboxmemdump.sh <VM name>
VBoxManage debugvm $1 dumpvmcore --filename=$1.elf
size=0x$(objdump -h $1.elf|egrep -w "(Idx|load1)" | tr -s " " | cut -d " " -f 4)
off=0x$(echo "obase=16;ibase=16;`objdump -h $1.elf|egrep -w "(Idx|load1)" | tr -s " " | cut -d " " -f 7 | tr /a-z/ /A-Z/`" | bc)
head -c $(($size+$off)) $1.elf|tail -c +$(($off+1)) > $1.raw
@somebox
somebox / interview-engineers.md
Last active April 12, 2021 13:52
Interviewing Engineers

Note: This is an opinionated guide. While it is most effective for on-site, the same pattern can work with remote candidates.

How To Interview Engineers

Interviewing is hard. It's not easy to find good people, and once you do, it's often difficult to find out what they can do and how they work. A badly-run interview can pass over a great engineer. Conversely, some engineers are good at passing traditional tech interviews, but bring major problems with work habits or team fit.

The first priority of any manager is to hire the best people. Everything else must wait.

Screening

@wes-goulet
wes-goulet / gpg-git-setup.sh
Last active September 26, 2022 23:32
Commands to import and setup your gpg key for git commit signing
# install gpg
brew install gnupg
# copy my-gpg-key.asc from other workstation or lastpass or somewhere
# and then import it
gpg --import ~/Downloads/my-gpg-key.asc
# make sure it's there and get the key id (the part that comes after "rsa4096/")
gpg --list-secret-keys --keyid-format LONG
@davedarko
davedarko / deauther_killer.ino
Created January 16, 2018 17:20
Arduino Script to auto connect to deauthers by spacehuhn with standard passwords and replaces them with whatever you want.
#include <ESP8266WiFi.h>
WiFiClient client;
const char* ssid = "pwned";
const char* password = "deauther";
const char* host = "192.168.4.1";
void setup()
{
Serial.begin(115200);
@JeremyKennedy
JeremyKennedy / pa_cal.cfg
Last active March 9, 2023 05:48
Klipper Pressure Advance Line Calibration Macro
[gcode_macro PA_CAL]
# Klipper pressure advance line calibration macro.
# Usage: PA_CAL BED=100 NOZZLE=240 PA_START=0.0 PA_STOP=0.1 NZL=0.4
# Or you can execute with no parameters, which will use values from printer.cfg and saved_variables.cfg.
# First prints a line with current set PA, then prints 21 additional line segments starting with PA_START, and increasing to PA_STOP.
# Based on http://realdeuce.github.io/Voron/PA/pressure_advance.html
# Cleaned up and moved to using saved_variables.cfg by u/jibbsisme
# Sourced from u/Deepsiks, assisted by u/imoftendisgruntled, u/scul86, and thanks to u/beansisfat, u/stray_r
description: Tune Pressure Advance
@Tbruno25
Tbruno25 / automatic_button_programming.ino
Created September 3, 2019 03:24
Automatic Button Programming
// this sketch was brutally hacked together by TJ Bruno --- https://medium.com/@tbruno25
#include <Print.h>
#include <mcp_can.h>
#include <SPI.h>
#include <EEPROM.h>
#define CAN0_INT 2
MCP_CAN CAN0(10);
@boreycutts
boreycutts / i3-gaps_installation_guide.md
Last active January 30, 2024 19:05
A simple installation guide for i3-gaps

Installing i3-gaps

Dependencies

i3-gaps has some packages that are required for it to work so install these things:

sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake

You also need to install libxcb-xrm-dev, but I got Unable to locate package libxcb-xrm-dev when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:

mkdir tmp
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@kmobs
kmobs / frequencytester.md
Last active March 29, 2024 14:44
Frequency Tester

Frequency Testing

This will allow you to test a specific frequency that you hear when you do your resonance testing in Klipper and potentially track down where extra peaks are coming from. If something is rattling at a specific frequency, you can specify that frequency and feel around the printer until you track it down.

Code was adopted by zifnab from somewhere in Klipper.

Usage

You have to have [resonance_holder] in your printer.cfg.

The command is HOLD_RESONANCE AXIS=<axis> FREQ=int SECONDS=<seconds>