Skip to content

Instantly share code, notes, and snippets.

View thefotios's full-sized avatar
💭
definitely snacking

Fotios Lindiakos thefotios

💭
definitely snacking
View GitHub Profile
@thefotios
thefotios / authorized_keys
Created February 9, 2011 21:33
My public SSH keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCMeu6/bOB5TcZu2tyrjq6oKfiF6OInxcxEn2Pk44XrmRNyx8pIdNldy9wOi+SvagreeHf73oJh0C7I1MEg/C7eVsRa8pgaLIYc3JWud0+3J8M0ls6c2/F06/99/wsMZmC2dYm198c1pDpOZPTVHZmvSB0EE13k6vpycX55CcOeaRaTsJB+cc9UxMS+1NWwqF5ILDBSd87LhnQGjl7jEIjFn7TxWdxsgzPAsycWfZl7h42ECrQeU+t19qJHIc126iwxUbZEZrjhPcklvtvdWPZ/U4pzFrwEOOsG9+aMnjw6hT5UJ+A+nI9aMkdm1Ve+QD2EH+aM71Hq6bdHoWKiz5DJ fotioskey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEDIrkjk1Dc/25xn2VZ/Ro3TAtjeiReqGaInWK0kpDJ9nOZ4Zv5Sz/s/kYVQ1cTgV/N95UkuFIhY7392c1ErXi+AZkbs8JGavCx+yJ6Q4NT1Wv9hZarqrCDo9ziepCMlPK/ViE6JgNwc4yOcEe4us1FLeEiU1V1VP2BjrTcBZDOliO8fOTO6JHyDDMFk6NTq3ivuMRU9bQ8/fZTSnAJKTDrDUofbI+u23GsurNrkJtsAgotYHixISbTchPfWY8ZMQiP4buHOBggQFSzhmHQ0cfaTPqBae5tdofF9scznPVY6Xw7fRDkZqfRcturAWX97RL+K0oW/mXFzN5qb1p77n9 fotios@thefotios.org
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtQNu+e3AITR7BdX+iIftGUjg+7moxHkCgo0O8vUMpXuKBaSSsPgW9NBRgpsNfDYVcSvZPX8bteifC2f/UPH1wzx8BCiwx5tkJmPkNZXynq8c4ywYs6+/DbmLARqKtRS3d7KswmFkzs5J5weS4lku13QWIEEsKgGC0iYoqek1tymW9Ue+zbxByLfw+KFZtmsXV74
@thefotios
thefotios / linecount.sh
Created April 26, 2011 15:11
This is a way to count lines in JavaScript files. It will count the comments (multiline with /*, *, and */ as well as single line //). It then outputs the number of lines, number of comment lines, and number of code lines
printf "%25s %6s %6s %10s\n" "Filename" "Lines" "Code" "Comments" && \
find -name "*.js" -exec awk ' \
/^[ \t]*([\/]*\*|\/\/)/ {comments++} \
/^[ \t]*$/ {blank++} \
END{printf "%25s %6s %6s %10s\n",FILENAME,FNR,FNR-comments-blank,comments} \
' {} \;
@thefotios
thefotios / config.json
Created September 28, 2011 14:25
Selenium WebDriver node config
{
"capabilities":
[
{
"browserName": "firefox",
"version": "6.0.2",
"maxInstances":5
}
],
"configuration":
@thefotios
thefotios / selenium
Created September 28, 2011 14:26
/etc/init.d/selenium script
#!/bin/bash
#
# Service for selenium (from http://www.thelinuxblog.com/adding-a-service-on-fedora/)
#
# Author: Fotios Lindiakos (fotios@redhat.com)
#
# chkconfig: 2345 55 45
#
# description: This is the selenium service
# processname: selenium
@thefotios
thefotios / selenium-deploy.sh
Created September 28, 2011 14:37
Script to deploy selenium on Fedora machines
#!/bin/bash
#
# This script should allow for selenium to be run on a headless Fedora box and connect to a hub server
#
# Author: Fotios Lindiakos (fotios at redhat.com)
EPHEMERAL_DIR="/usr/local/bin"
SELENIUM_DIR="/usr/lib/selenium"
HUB_SERVER="http://ec2-107-20-156-96.compute-1.amazonaws.com:4444"
@thefotios
thefotios / objump2shellcode.pl
Created October 2, 2011 16:12
Use this script to convert objdump output to a binary file
# usage: objdump -D test.exe | perl this_script.pl > file.shellcode
while(<>){
if (/^\s[\dA-Fa-f]+:\s(.*?)\s{2}/) {
foreach(split(/\s/,$1)){
printf pack('H*',$_) ;
}
}
}
@thefotios
thefotios / test_unit.rb
Created October 11, 2011 22:52
Setup and teardown for Test::Unit and Selenium
def setup
@url="http://localhost"
@verification_errors = []
@tags = []
@custom_data = {
"commit" => 'abcd1234',
"release" => 'rhc-site-0.79.4'
}
--- !ruby/object:ExampleTest
_assertion_wrapped: false
_result: !ruby/object:Test::Unit::TestResult
assertion_count: 1
channels:
CHANGED:
!ruby/object:Test::Unit::Util::ProcWrapper ?
a_proc: &id001 !ruby/object:Proc {}
hash: 140653561707680
@thefotios
thefotios / bonus.c
Created October 13, 2011 04:48
A school project
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pwd.h>
#include <sys/types.h>
#include <time.h>
#define emailAddrLen 33
#define IDStringLen 9
set nocompatible
set smartindent
set number
set sw=2
set ts=2
set sts=2
set et
syntax on
filetype plugin indent on