Skip to content

Instantly share code, notes, and snippets.

View pedrominicz's full-sized avatar

Pedro Minicz pedrominicz

View GitHub Profile
@pedrominicz
pedrominicz / init.vim
Last active December 21, 2022 00:42
Minimal Neovim config.
set mouse=
set nomodeline
set tabstop=2 shiftwidth=2 expandtab
" Show tabs.
set list listchars=tab:>\
set linebreak
set ignorecase wildignorecase
set undofile
set splitright
@pedrominicz
pedrominicz / .bashrc
Last active May 15, 2023 20:05
Minimal Bash config with infinite command history and better autocomplete settings.
#
# ~/.bashrc
#
# If not running interactively, don't do anything.
[[ $- != *i* ]] && return
shopt -s histappend
HISTSIZE=''
HISTFILESIZE=''
@pedrominicz
pedrominicz / fizzbuzz.asm
Last active June 9, 2019 02:26
Fizz Buzz in assembly.
global _start
SECTION .data
fizz db 'fizz', 0
buzz db 'buzz', 0
newline db 10, 0
SECTION .bss
buffer resb 256
@pedrominicz
pedrominicz / .radare2rc
Last active June 19, 2019 13:16
radare2 config and cheatsheet.
# teminal 256 colors
e scr.color=2
e scr.utf8=true
e scr.utf8.curvy=true
# allow placing breakpoints outside mapped memory
#e dbg.bpinmaps=false
# color scheme
eco twilight
@pedrominicz
pedrominicz / config.h
Last active September 27, 2023 14:18
dwm config
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 16; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const float floatingopacity = 0.2;
static const char *fonts[] = { "Source Code Pro:style=Bold:pixelsize=16:antialias=true:autohint=true" };
static const char dmenufont[] = "Source Code Pro:style=Bold:pixelsize=16:antialias=true:autohint=true";
@pedrominicz
pedrominicz / config.h
Last active December 13, 2022 13:25
st config
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Source Code Pro:style=Regular:pixelsize=16:antialias=true:autohint=true";
static char *font2[] = {
"DejaVu Sans Mono:style=Regular:pixelsize=16:antialias=true:autohint=true"
@pedrominicz
pedrominicz / user-dirs.dirs
Last active December 14, 2022 15:35
Custom XDG user directories.
# xdg default directories
XDG_DESKTOP_DIR="$HOME/tmp"
XDG_DOCUMENTS_DIR="$HOME/tmp"
XDG_DOWNLOAD_DIR="$HOME/tmp"
XDG_MUSIC_DIR="$HOME/tmp"
XDG_PICTURES_DIR="$HOME/tmp"
XDG_PUBLICSHARE_DIR="$HOME/tmp"
XDG_TEMPLATES_DIR="$HOME/tmp"
XDG_VIDEOS_DIR="$HOME/tmp"
@pedrominicz
pedrominicz / .xinitrc
Last active February 11, 2023 00:44
Minimal xinitrc for dwm
#!/bin/sh
# Source global X session scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
@pedrominicz
pedrominicz / install-i386-elf-toolchain.sh
Last active October 12, 2023 17:22
Reference script for installing a GCC i386-elf toolchain.
#!/bin/sh
# https://github.com/cfenollosa/os-tutorial/tree/master/11-kernel-crosscompiler
# http://geekos.sourceforge.net/docs/crossgcc.html
# https://github.com/nativeos/pkgbuild-i386-elf-toolchain/blob/master/i386-elf-gcc/PKGBUILD
# http://www.linuxfromscratch.org/lfs/view/development/chapter06/gcc.html
# https://gcc.gnu.org/install/configure.html
TARGET=i386-elf
# Add `$PREFIX/bin` to your `$PATH`.
PREFIX=/opt/i386-elf
@pedrominicz
pedrominicz / focus.vim
Last active October 13, 2019 15:28
An extremely minimal vim color scheme.
highlight clear
let colors_name="focus"
highlight Normal ctermfg=none ctermbg=none
set background=dark
hi! link Cursor Normal
"hi! link Comment Normal