Skip to content

Instantly share code, notes, and snippets.

View agusvama's full-sized avatar
:octocat:

Agus Vama agusvama

:octocat:
View GitHub Profile
@agusvama
agusvama / 40_custom
Created September 8, 2016 03:05
Grub entries for Arch and Slackware
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#Arch
menuentry "Arch Linux is 4 cr8zy people" {
echo "Wake up Neo"
set root=(hd0,gpt6)
linux /boot/vmlinuz-linux root=/dev/sda6
@agusvama
agusvama / brillo
Created September 17, 2016 06:30
para cambiar el brillo: $ brillo {valor}
#!/bin/bash
xbacklight -set $@
@agusvama
agusvama / rm
Created September 17, 2016 07:33
delete files (well, move them to recycle folder)
#!/bin/bash
/usr/bin/mv $@ ~/recycle/
@agusvama
agusvama / mv
Created September 17, 2016 07:34
move files and make a backup in recycle folder
#!/bin/bash
/usr/bin/cp $1 ~/recycle/$1
/usr/bin/mv $1 $2
@agusvama
agusvama / internet
Created September 17, 2016 07:36
requiere ip on Slackware
#!/bin/bash
dhclient -v -4 -pf /root/dhclient.pid $@
@agusvama
agusvama / 00-keyboard.conf
Created September 24, 2016 03:26
keyboard layout:us, and able to use ñ (with alt-gr + n)
#/etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
Option "XkbVariant" "altgr-intl"
EndSection
#us intl with AltGr key, Slackware
#/etc/X11/xorg.conf.d/90-keyboard-layout.conf
Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "us"
Option "XkbVariant" "altgr-intl"
# Option "XkbOptions" "terminate:ctrl_alt_bksp"
//static ip configuration on Slackware
//turn down interface
# ip link set eth0 down
//flush old ip
# ip addr flush dev eth0 up
//add static ip
# ip addr add {ip}/{mask} dev eth0 broadcast +
@agusvama
agusvama / apagar
Created October 27, 2016 04:51
turn off slackware cleaning /tmp folder before, leaveing SBo cache folder
#!/bin/bash
echo cleaning /tmp
cd /tmp
find ! -name 'SBo' ! -name . ! -name .. -type d -exec rm -rf {} +
find ! -name . ! -name .. -type f -exec rm -f {} +
echo turn off
shutdown -h now
@agusvama
agusvama / bash_prompt
Last active August 12, 2020 23:16
Get a prompt that reacts to either a proper or wrong command, with git branch support
PS1="\`if [ \$? = 0 ];
then echo '\[\033[38;5;79m\]\w > \[\033[38;5;99m\]['\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)']\[\033[00m\]
\[\033[30;48;5;6m\]( ._.)φ__\[\033[00m\] '
else echo '\[\033[38;5;79m\]\w > \[\033[38;5;99m\]['\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)']\[\033[00m\]
\[\033[31m\]( o_o)φ__\[\033[00m\] '; fi
\`"