Skip to content

Instantly share code, notes, and snippets.

View vgerak's full-sized avatar

Vasilis Gerakaris vgerak

View GitHub Profile

Keybase proof

I hereby claim:

  • I am vgerak on github.
  • I am vgerak (https://keybase.io/vgerak) on keybase.
  • I have a public key whose fingerprint is 8C52 8BAC 1F73 C7E7 CED1 2292 E440 B463 9F95 ADA0

To claim this, I am signing this object:

@vgerak
vgerak / gist:08d6597030a9aeec0d57
Created November 3, 2014 16:01
OneName verification
Verifying that +indoril is my Bitcoin username. You can send me #bitcoin here: https://onename.io/indoril
@vgerak
vgerak / .zshrc
Last active January 31, 2021 17:54
GLaDOS greeting screen for bash/zsh (mac)
findcpu(){
sysctl -n machdep.cpu.brand_string
}
findkernelversion(){
uname -mrs
}
mem=$(sysctl -n hw.memsize)
@vgerak
vgerak / test.py
Last active January 4, 2016 00:29
VM Disk size
from bundle_volume import *
def _read_fstable(f):
"""Use this generator to iterate over the lines of and fstab file"""
if not os.path.isfile(f):
raise FatalError("Unable to open: `%s'. File is missing." % f)
FileSystemTableEntry = namedtuple('FileSystemTableEntry',
'dev mpoint fs opts freq passno')
@vgerak
vgerak / statvfs-df.c
Created January 21, 2014 12:25
Get disk usage with statvfs()
#include <stdio.h>
#include <sys/statvfs.h>
int main(int argc, const char *argv[])
{
const unsigned int GB = (1024 * 1024) * 1024;
struct statvfs buffer;
int ret = statvfs(argv[1], &buffer);
@vgerak
vgerak / IRCBot
Created November 26, 2013 12:44
IRC Bot commands
Το bot απαντάει >> MONO << σε private messages.
Επιλέχτε private message στον client σας ή γράψτε "/query rcopy" και μετά δώστε κάποια εντολή.
Προσοχή: Περιοριστείτε σε 2 queries / 5 λεπτά, για αποφυγή flooding
Διαθέσιμες εντολές προς όλους:
.omilitis - Δείχνει τον τρέχων ομιλιτή
.apartia - Δείχνει την εκτιμώμενη απαρτία
.apotelesmata - Δείχνει τα αποτελέσματα της ψηφοφορίας
.plaisia - Δεν κάνει τίποτα (ακόμη)
@vgerak
vgerak / scc.c
Created March 12, 2012 22:37
Find strongly connected components, given a list of edges in a graph
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : SCC.c
* Purpose : Find strongly connected components (SCCs) in directed graphs
* Creation Date : 12-03-2012
* Last Modified : Mon Mar 12 23:36:16 EET 2012