View cleanNotifications.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: @giu1io | |
# Thanks @LucaTNT for making the script work on < 10.10 | |
MAJOR_OSX_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $2}') | |
if [[ $MAJOR_OSX_VERSION -ge 10 ]] | |
then | |
DB_PATH=`getconf DARWIN_USER_DIR`com.apple.notificationcenter/db/db | |
else | |
DB_PATH="$HOME/Library/Application Support/NotificationCenter/" |
View casualtext.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Casual Text | |
* Autore: Luca Zorzi | |
* Data: 13/11/2012 (originariamente risale circa al 2004-2005) | |
* Licenza: BSD | |
* Scopo: nessuno | |
* Funzionamento: inserire 4 file txt nella stessa cartella in cui risede questo script: | |
* nomi.txt dovrà contenere dei nomi, singolari | |
* verbi.txt dovrà contenere dei verbi TRANSITIVI, non vogliamo frasi come pisciare il cane oppure salire le valigie | |
* complementi.txt dovrà contenere dei complementi oggetti, che saranno generalmente altri nomi |
View gist:5520296
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<keymap> | |
<global> | |
<keyboard> | |
<n>XBMC.Action(reloadkeymaps)</n> | |
</keyboard> | |
<remote> | |
<four>ActivateWindow(filemanager)</four> | |
<five>ActivateWindow(home)</five> | |
<seven>ActivateWindow(Videos,MovieTitles)</seven> | |
<eight>ActivateWindow(Videos,TvShowTitles)</eight> |
View gist:5540119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<keymap> | |
<global> | |
<keyboard> | |
<!-- reload Keymap, n on the actual keyboard --> | |
<n>XBMC.Action(reloadkeymaps)</n> | |
<!-- Orange movie button brings to Movie list --> | |
<b mod="ctrl,alt">ActivateWindow(Videos,MovieTitles)</b> | |
<!-- Yellow TV button brings to TV Show list --> |
View Vibrazioni
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Programma per verificare che la mia chiusura del problema sia buona | |
% Link al testo: http://cl.ly/P3ia | |
% Immagine risultante: http://cl.ly/P4Zz | |
clear; close all; clc; | |
R = 10; | |
L = 15; | |
x_cir = @(x) R*sin(x); | |
y_cir = @(x) R*cos(x); |
View parseTrenitaliaICS.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Based on CalFileParser (https://github.com/controlz/CalFileParser) by Michael Mottola | |
// Author: @LucaTNT | |
// My code is MIT licensed as well | |
// Inserisci qui dove salvare il file ICS sistemato | |
$saveTo = '/Users/luca/Downloads/AddToiCal.ics'; | |
/* | |
* CalFileParser |
View SalvaICS.applescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Edited by @LucaTNT, originally from Nigel Garvey (http://macscripter.net/viewtopic.php?id=29010) | |
property theAttachmentPath : (path to downloads folder) as Unicode text | |
using terms from application "Mail" | |
on perform mail action with messages theMessages for rule theRule | |
tell application "Mail" | |
repeat with This_Message in theMessages | |
repeat with ma in mail attachments of This_Message | |
set n to name of ma | |
if n ends with ".ics" then |
View prettyDateDifference.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Make a pretty date difference from the current time | |
Author: Luca Zorzi (@LucaTNT) | |
License: BSD | |
*/ | |
function parseDate($timestamp) | |
{ | |
// Current timestamp |
View crashplan_remote.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# crashplan_remote.sh | |
# Author: Luca Zorzi (@LucaTNT) | |
# License: WTFPL (http://www.wtfpl.net) | |
# | |
# Connects to CrashPlan running in a FreeNAS jail and launches the Desktop APP, then reverts all the settings back to their defaults | |
CRASHPLAN_SERVER="192.168.1.78" | |
CRASHPLAN_USER="luca" |
View compare_dns.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Luca Zorzi <luca A_T tuttoeniente D_O_T net> | |
# License: CC Attribution (http://creativecommons.org/licenses/by/3.0/) | |
# Release date: 2009-12-13 | |
# A little script to compare 2 DNS servers | |
if [[ "$#" != "2" ]] | |
then | |
echo "USAGE: $0 dns-server-1 dns-server-2" | |
exit 1 |
OlderNewer