Skip to content

Instantly share code, notes, and snippets.

View eyenx's full-sized avatar

Toni Tauro eyenx

View GitHub Profile
@eyenx
eyenx / openpgp.md
Last active November 8, 2022 06:51
keyoxide

openpgp4fpr:32A63525D40A109B684936BC0796132F0077A5F8

BEGIN MESSAGE.
YskGk0dYUqeeMJF I3n0o14nwkktMrh zSqGQoNIdsCrhdO kozRGl1VJEj893A
8gQtKSkNFjA14LW UJySvzJflJkTCKq 6Xr2MZHgg4N7HV0 jMW3GCA5LofdHwN
4sVaHVkD2PiL7Eu ZSAzONZWOAFEdNw CVbueneXK06iFNi poT5bEIOW8hAGMA
OHUMt3tLIohYCGz wgtKap5EkeqLQOj jA7pd.
END MESSAGE.
@eyenx
eyenx / keybase.md
Last active October 11, 2016 17:29

Keybase proof

I hereby claim:

  • I am eyenx on github.
  • I am eyenx (https://keybase.io/eyenx) on keybase.
  • I have a public key ASCOQUXyicoKpV3h5FajWFRmP5Vy3ixzcIhVT9mO0SJb2Ao

To claim this, I am signing this object:

@eyenx
eyenx / check_letsencrypt.sh
Last active January 20, 2016 19:48
Test if let's encrypt certificate is about to expire and redeploy tutum stack to get a new one
test $(($(date "+%s" --date="$(openssl s_client -connect eyenx.ch:443 2>/dev/null <<<QUIT | openssl x509 -noout -enddate | cut -d= -f2)") - $(date "+%s"))) -lt 86400 && tutum stack redeploy eyenx-ch
@eyenx
eyenx / prefs.js
Last active December 26, 2015 14:38
user_pref("browser.bookmarks.restore_default_bookmarks", false);
user_pref("browser.cache.disk.parent_directory", "~/.cache/firefox");
user_pref("browser.cache.memory.capacity", 1048576);
user_pref("browser.download.dir", "/tmp/dwn");
user_pref("browser.download.folderList", 2);
user_pref("browser.download.manager.showWhenStarting", false);
user_pref("browser.download.panel.firstSessionCompleted", true);
user_pref("browser.download.panel.shown", true);
user_pref("browser.download.save_converter_index", 0);
user_pref("browser.download.useToolkitUI", true);
@eyenx
eyenx / wfica.sh
Last active December 25, 2015 12:59
#!/bin/sh
## workaround proxy error by kru
tmp=/tmp/$RANDOM
awk '{ gsub("ProxyType.*",""); print }' < $1 > $tmp
export ICAROOT=/usr/lib/ICAClient
${ICAROOT}/wfica -file $tmp
<?php
function curlit($url){
$get=curl_init("$url");
curl_setopt($get,CURLOPT_RETURNTRANSFER,1);
$resp=curl_exec($get);
curl_close($get);
return($resp);
}
function getrandwp(){
$url="http://wallbase.cc/random?section=wallpapers&q=&res_opt=eqeq&res=1920x1080&thpp=32&purity=100&board=21&aspect=0.00";
#!/usr/bin/perl
### ompldr upload script
use v5.14;
use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request::Common;
## def
my $url="http://ompldr.org/upload";
@eyenx
eyenx / xmonad.hs
Last active December 20, 2015 00:39
-- gnomeye's xmonad.hs
-- imports
import XMonad
import System.IO (hPutStrLn)
import Data.Monoid
import Data.List
@eyenx
eyenx / imp.hs
Last active December 20, 2015 00:38
--baby functions
doubleMe x = x + x
doubleUs x y = x * 2 + y * 2
doubleSmallNumber x = if x > 100 then x else x*2
-- list comprehensions
boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x ]
listcomprehend xs = [x+2 | x<-xs, x+2>12]
--length'
length' xs = sum [1 | _ <- xs]
--removeNonUppercase