Skip to content

Instantly share code, notes, and snippets.

View 0x3333's full-sized avatar

TFGF 0x3333

  • 22:41 (UTC -03:00)
View GitHub Profile
@CMCDragonkai
CMCDragonkai / job_control_zsh_bash.md
Last active March 14, 2025 14:37
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@schtobia
schtobia / tschroot
Last active October 15, 2024 06:44
Mount /tmp, /dev/pts, /dev/shm and /proc into chroot and change into chroot
#! /bin/sh
[ ! -d "$1" ] && echo "$1 is not a valid directory." && exit 1;
trap "umount \"${1}\"/tmp \"${1}\"/dev/null \"${1}\"/dev/pts \"${1}\"/dev/random \"${1}\"/dev/shm \"${1}\"/dev/urandom \"${1}\"/proc" EXIT INT TERM HUP PIPE &&
mount --bind /tmp "${1}/tmp" && \
mount --bind /dev/null "${1}/dev/null" && \
mount --bind /dev/pts "${1}/dev/pts" && \
mount --bind /dev/random "${1}/dev/random" && \
mount --bind /dev/shm "${1}/dev/shm" && \
mount --bind /dev/urandom "${1}/dev/urandom" && \
mount --bind /proc "${1}/proc" && \
@chaeplin
chaeplin / irsend.sendRaw.ino
Last active September 20, 2023 01:19
IR SEND RAW
// https://github.com/shirriff/Arduino-IRremote
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
@chaeplin
chaeplin / Arduino_Record_Long_AirConditioner_Infrared_Signals_10.ino
Last active July 15, 2018 15:48
Arduino_Record_Long_AirConditioner_Infrared_Signals_10
// http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/
// http://www.analysir.com/blog/wp-content/uploads/2014/03/Arduino_Record_Long_AirConditioner_Infrared_Signals_10.txt
// For LG AC
/*
Author: AnalysIR
Revision: 1.0
This code is provided to overcome an issue with Arduino IR libraries
It allows you to capture raw timings for signals longer than 255 marks &amp; spaces.
@srijanshetty
srijanshetty / package-vagrant-box.md
Last active June 20, 2023 08:49
Clean up a vagrant box before packaging

We’re now going to clean up disk space on the VM so when we package it into a new Vagrant box, it’s as clean as possible. First, remove APT cache

$ sudo apt-get clean

Then, “zero out” the drive (this is for Ubuntu):

$ sudo dd if=/dev/zero of=/EMPTY bs=1M
@shamil
shamil / mount_qcow2.md
Last active May 9, 2025 18:51
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8