Skip to content

Instantly share code, notes, and snippets.

View syxanash's full-sized avatar

Simone Marzulli or simply /^syx.*$/ syxanash

View GitHub Profile
@syxanash
syxanash / aescryptgui.pl
Created August 16, 2012 13:03
a GUI for AESCrypt on GNU/Linux
#!/usr/bin/perl
# AESCrypt GUI for GNU/Linux
# DWTFYWT (c) syxanash
use strict;
use warnings;
use IPC::Open3;
use Symbol qw(gensym);
@syxanash
syxanash / hamlet_wifi_switcher.pl
Created January 20, 2013 09:39
it simply switches on and off the wireless device, on Hamlet routers.
#!/usr/bin/perl
# (C) syxanash 2011 - syxanash[ at ] gmail.com
use strict;
use warnings;
use WWW::Mechanize;
use Getopt::Long;
use Tk;
@syxanash
syxanash / brokyplo.pl
Last active December 19, 2015 02:38
Google Finance client
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use Getopt::Long;
use File::Slurp;
use Term::ANSIColor;
use Env;
@syxanash
syxanash / first_japh.pl
Last active December 19, 2015 02:48
my first JAPH
#!/usr/bin/perl
# oh my very first JAPH :-D
# dedicated to one of my good
# old friend plucky
# (C) syxanash 2012
$l=do{local$/;<DATA>};$l=~
s/\#//g ;@u=split (' ',$l)
;@k=('a'..'z',' ');foreach
@syxanash
syxanash / cowboy.cow
Last active December 19, 2015 21:39
my cows
## (c) 2011 Syxanash <syxanash@gmail.com>
##
$the_cow = <<EOC;
$thoughts
$thoughts _._
$thoughts ____/___\\____
$thoughts .'|o o|'.
$thoughts .'.| U |.'.
' \\ - / '
/ |=| \\
@syxanash
syxanash / arpunz.rb
Created January 27, 2016 15:20
Detect if default gateway MAC address changes in LAN
#!/usr/bin/env ruby
require 'logger'
def get_gateway(interface)
got_errors = true
default_gateway = %x[netstat -rn | grep -Eo 'default.*([0-9]{1,3}\.){3}[0-9]{1,3}.*#{interface}']
gateway_ip = %x[echo '#{default_gateway}' | awk '{printf $2}']
gateway_mac = %x[arp -an | grep -w #{gateway_ip} | awk '{print $4}']
@syxanash
syxanash / GOL.java
Last active November 3, 2021 10:31
Implementation of Conway's Game of Life in java
import java.util.ArrayList;
import java.util.Random;
/*
I was bored I tried to implement a Conway's Game of Life
for the first time in my life.
consider the following diagram
grid[i - 1][j - 1] . grid[i - 1][j] . grid[i - 1][j + 1]
@syxanash
syxanash / rollerblade.cow
Last active November 6, 2016 13:49
a cowsay file here's what it looks like: http://i.imgur.com/8o1MSUh.png
## (c) 2011 Syxanash <syxanash@gmail.com>
##
$the_cow = <<EOC;
$thoughts ____
$thoughts / \\
$thoughts /mmmmmm\\ ---------------------------
$thoughts d| L L |b
'.\\ o/.'..
||| ___| |___ ``. --------------------
(~)/ / ) \\ / ( \\ ``.
@syxanash
syxanash / dash_scan.rb
Last active January 31, 2021 17:24
little scripts that checks when amazon dash is connected to wifi network
require 'arp_scan'
# the following variables may need to be edited
dash_mac = '00:00:00:00:00:00'
interface = 'en0'
already_checked = false;
loop do
#puts "scanning network..."
@syxanash
syxanash / genio.rb
Last active March 20, 2023 12:46
lyrics downloader from genius.com with API+Scraping 🏴‍☠️
require 'rest-client'
require 'nokogiri'
require 'genius'
require 'similar_text'
require 'optparse'
GENIUS_CLIENT_TOKEN = 'YOUR API TOKEN GOES HERE!!!'.freeze
class LyricsNotFound < StandardError; end