Skip to content

Instantly share code, notes, and snippets.

View thewh1teagle's full-sized avatar
💭
coding

thewh1teagle

💭
coding
  • localhost
  • The martian
View GitHub Profile
@thewh1teagle
thewh1teagle / dwm
Last active May 16, 2022 08:22
dwm brightness conrol keys
sudo apt-get install xbacklight
: /etc/X11/xorg.conf
Section "Device"
Identifier "Card0"
Driver "intel"
Option "Backlight" "/sys/class/backlight/intel_backlight"
EndSection
#!/bin/sh
# Configure the following variables according to your requirements
version="24.0" # chose from http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
language="en-US" # e.g. "de" or "en-US"
########################################################
application="firefox" # "thunderbird" or "firefox" but file extension, archive extraction, and binary execution needs to be adapted as well see filenames at http://download.cdn.mozilla.net/pub/mozilla.org/
#!/usr/bin/bash
beep () {
if [ "$1" = --list ]
then
find /usr/share/sounds -type f -exec basename {} \; | sort -n | tr '\n' ' '; echo
else
paplay $(find /usr/share/sounds -type f -iname "${1:-bell}*" | head -1)
fi
}
@thewh1teagle
thewh1teagle / silent_boot.sh
Created June 8, 2020 08:53
Silent boot Debian 10
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
echo 'GRUB_DEFAULT=0' > /etc/default/grub
echo 'GRUB_TIMEOUT=5' >> /etc/default/grub
echo 'GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`' >> /etc/default/grub
echo 'GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current rd.systemd.show_status=auto rd.udev.log-priority=3 vt.global_cursor_default=0"' >> /etc/default/grub
echo 'GRUB_CMDLINE_LINUX="console=ttyS0"' >> /etc/default/grub
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib non-free
deb-src http://deb.debian.org/debian/ stable main contrib non-free
deb http://deb.debian.org/debian/ stable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free
#!/usr/bin/bash
# sudo apt install gcc-arm-linux-gnueabihf
VERSION=1.2.11
wget https://zlib.net/zlib-$VERSION.tar.gz
tar xf zlib-$VERSION.tar.gz && rm zlib-$VERSION.tar.gz
cd zlib-$VERSION
mkdir build
### PUT IN BASHRC ###
# If there are multiple matches for completion, Tab should cycle through them
bind 'TAB':menu-complete
# Display a list of the matching files
# empty program
section .text ;the actual code
global _start ; make label visible for linker
_start: ;label, as main() function in C
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel ( like syscall )
@thewh1teagle
thewh1teagle / hello.asm
Last active May 16, 2022 08:22
hello world assembly x86
# Useful variables
STDIN equ 0
STDOUT equ 1
STDERR equ 2
SYS_READ equ 0
SYS_WRITE equ 4
SYS_EXIT equ 1
KERNEL equ 0x80
%macro syscall 0