Skip to content

Instantly share code, notes, and snippets.

Facundo Bianco vando

View GitHub Profile
@vando
vando / procmail for trac
Created May 5, 2015
I use trac as ticket report systen and I don't want to store emails with status "accepted" or "fixed"
View procmail for trac
MAILDIR=/home/vando/spool/mail
DEFAULT=/home/vando/spool/mail/inbox/
:0
* ^X-Trac-Version
{
:0B:
* \* status.*(accepted|closed)
/dev/null
View ssh with ssh-add
ssh()
{
if [ -z "$SSH_AUTH_SOCK" ]
then
eval `/usr/bin/ssh-agent`
elif [ "$SSH_AUTH_SOCK" != "`echo /tmp/ssh-*/agent.*`" ]
then
export SSH_AUTH_SOCK=`echo /tmp/ssh-*/agent.*`
fi
View getmails for multiple accounts
#!/bin/bash
MAILDIR=/home/vando/.getmail
MAILNAM="account0 account1 account2"
GETMAIL=`whereis getmail`
if [ -z "`pgrep -f ${GETMAIL}`" ]
then
for NAM in ${MAILNAM}
do
@vando
vando / 30_process
Created May 13, 2015
Action script to kill process before suspend.
View 30_process
#!/bin/sh
#
# /etc/pm/sleep.d/30_process
# Action script to kill process before suspend.
PROCESS="ssh getmail"
PATH=/usr/bin
case ${1} in
suspend|hibernate)
@vando
vando / Proxy de Fibertel bloquea remote access
Created May 22, 2015
Imposible conectarse con Fibertel de forma remota a tu casa porque tienen un proxy
View Proxy de Fibertel bloquea remote access
> nmap -sV MYIP | sed -n '/PORT/,$p'
PORT STATE SERVICE VERSION
25/tcp filtered smtp
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds
1080/tcp filtered socks
1720/tcp filtered H.323/Q.931
3128/tcp filtered squid-http
@vando
vando / esmtp on openBSD
Created May 27, 2015
I used it on openBSD 5.5
View esmtp on openBSD
# libesmtp
# with "--enable-debug=yes" you can use "-X /tmp/esmtp" option
ftp -4 http://www.stafford.uklinux.net/libesmtp/libesmtp-1.0.6.tar.gz
tar zxf libesmtp-1.0.6.tar.gz && cd libesmtp-1.0.6
./configure --prefix=/usr/local --enable-debug=yes
make && make install
# esmtp
ftp -4 ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/esmtp-1.2.tar.bz2
tar jxf esmtp-1.2.tar.bz2 && cd esmtp-1.2
@vando
vando / vifmrc
Created May 27, 2015
For vifm 0.5
View vifmrc
# I really hate vifm 0.7.x, I still using vifm 0.5
VI_COMMAND=jed
USE_TRASH=0
USE_ONE_WINDOW=1
USE_SCREEN=0
LEFT_WINDOW_SORT_TYPE=1
RIGHT_WINDOW_SORT_TYPE=1
LWIN_FILTER=\.o$
LWIN_INVERT=1
RWIN_FILTER=\.o$
@vando
vando / compaq presario mouse pointer issue
Created May 27, 2015
If you have a Compaq Presario and your mouse pointer moves up without your control, try this
View compaq presario mouse pointer issue
echo "install psmouse proto=imps" > /etc/modprobe.d/touchpad
rmmod psmouse
modprobe psmouse proto=imps
View Gentoo's Dina Font package content
$> wget -qO - http://distfiles.gentoo.org/distfiles/dina-pcf-2.89.tar.gz | tar ztf -
Dina-PCF/
Dina-PCF/DinaBold10.pcf
Dina-PCF/DinaBold8.pcf
Dina-PCF/DinaBold9.pcf
Dina-PCF/DinaBoldItalic10.pcf
Dina-PCF/DinaBoldItalic8.pcf
Dina-PCF/DinaBoldItalic9.pcf
Dina-PCF/DinaItalic10.pcf
Dina-PCF/DinaItalic8.pcf
View Basic template for unix functions
func_name()
{
case ${1} in
up|start) command ;;
down|stop) command ;;
restart) func_name down ; sleep 1 ; func_name up ;;
st|status) pgrep -fl command ;;
-h|--help|"") echo "useful info" ;;
*) echo -e "func_name: invalid option '$1'\nfunc_name -h for help" ;;
esac
You can’t perform that action at this time.