Skip to content

Instantly share code, notes, and snippets.

View Edo78's full-sized avatar
💻
On a journey to learn everything

Federico Granata Edo78

💻
On a journey to learn everything
View GitHub Profile
@Edo78
Edo78 / keybase.md
Created July 25, 2021 13:35
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@Edo78
Edo78 / gist:6f25606587774a91260d31c9b2f2f7f6
Created October 27, 2020 15:07
Shell function that wrap around tmux and create/attach to a "default" session or to a named one
tm() {
if [[ -n $1 ]]
then
sessionname=$1
else
sessionname='default'
fi
tmux new-session -A -s $sessionname
}
@Edo78
Edo78 / beer.zsh
Last active June 5, 2019 09:54
Un ridicolo script per alcolizzati
#!/bin/zsh
(( tasso_alcolemico = 0.0 ))
while true
do
echo beer
echo burp
(( tasso_alcolemico += 0.25 ))
if [[ $tasso_alcolemico -gt 4.0 ]]
then
echo "Se mi scusate vado un attimo in coma etilico"
@Edo78
Edo78 / Codice.gs
Last active February 11, 2018 16:33
A Google Apps Script that check how many unread spam are in your Gmail spam folder and log it to Stackdriver
function spamMonitor() {
var unreadSpam = GmailApp.getSpamUnreadCount();
var log = {
message: 'Discussioni non lette in Spam: '+ unreadSpam,
unreadSpam: unreadSpam
};
if(unreadSpam == 0){
console.info(log);
}else if(unreadSpam < 5){
/**
* Retrieve the birthdays in a range and return them in two lists, one for today's and one for the rest of the period
*
* @name getBirthdays
* @function
* @param {number} days - number of days to add to today to get the date range (optional)
* @returns {object} object with following properties 'today' with today's birthdays 'remaining' with the remaingin birthdays for the date range
*/
function getBirthdays(days) {
var result = {
@Edo78
Edo78 / solarized_setup.js
Last active January 2, 2016 13:15 — forked from baldwicc/solarized_setup.js
Solarized Dark for Chrome Secure Shell (nassh)
/**
* STEP 1: Setup
* - Open Chrome Secure Shell settings
* - Open JS Console (CTRL+SHIFT+J)
* - Copy and paste the following:
*/
var s7d_colours = {
'base03': '#002b36',
'base02': '#073642',
'base01': '#586e75',