Skip to content

Instantly share code, notes, and snippets.

View tatic0's full-sized avatar

fran varas tatic0

View GitHub Profile
@tatic0
tatic0 / gist:4160731
Created November 28, 2012 12:02 — forked from yyuu/gist:1569253
df in python on Linux
#!/usr/bin/env python
# df.py
# inispirational code taken from:
# https://gist.github.com/1569253
from __future__ import with_statement
import contextlib
import os
import sys
@tatic0
tatic0 / nyan.sh
Created October 15, 2012 12:05
bash nyan cat
#!/bin/bash
# nyan.sh
NYAN="~=[,,_¸¸]:3"
length=0
for length in {1..100}; do
clear
printf -v line '%*s' "$length"
@tatic0
tatic0 / ifping.sh
Last active October 11, 2015 15:27
as soon as the server replies to ping, do something
#!/bin/bash
# ifping.sh
# f varas 10 2012
##
## you need to have sshpass or ssh-key
## to grant "passwordless" access to the servers
# execute an action when remote server replies to ping
counter=1
@tatic0
tatic0 / filekeeper.py
Created September 29, 2012 13:34
detect duplicated files
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# filekeeper.py
import os, sys, hashlib, fnmatch
# TODO
# os.link(source, link_name)
# set to false for quieter output
@tatic0
tatic0 / README
Created September 8, 2012 13:44
progress bar using zenity
zenity example
@tatic0
tatic0 / README
Created July 3, 2012 09:14
colours in bash
BaSH color examples
@tatic0
tatic0 / macaddresslookup.sh
Created July 2, 2012 14:18
mac address lookup (needs wireshark installed)
#!/bin/bash
if [[ ! $1 ]]
then echo "Usage: $0 <mac address>"
exit 1
else
mac=$1
#echo ${mac:0:8}
oui=${mac:0:8}
grep -i $oui /usr/share/wireshark/manuf