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 | |
OUTPUT="`speedtest-cli --simple`" | |
PING=`echo "$OUTPUT" | grep Ping | sed 's/[a-zA-Z:]* \([0-9]*\.[0-9]*\) [a-zA-Z/]*/\1/'` | |
DOWNLOAD=`echo "$OUTPUT" | grep Download | sed 's/[a-zA-Z:]* \([0-9]*\.[0-9]*\) [a-zA-Z/]*/\1/'` | |
UPLOAD=`echo "$OUTPUT" | grep Upload | sed 's/[a-zA-Z:]* \([0-9]*\.[0-9]*\) [a-zA-Z/]*/\1/'` | |
DATE=`date +%Y/%m/%d` | |
TIME=`date +%H:%M:%S` |
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" |
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/" |
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 | |
# lookForNewiOS.sh | |
# Author: Luca Zorzi (@LucaTNT) | |
# Version: 0.2 (2014/11/20) | |
# License: BSD | |
# ----------------------------- | |
# This scripts uses icj.me's API to check if there are new iOS releases for | |
# the iOS devices specified in the MODELS array. You can put any number of devices, | |
# as long as they are in an array (space separated, enclosed in brackets). | |
# If a new release is available, it gets download into the DESTINATION_FOLDER, respecting |
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 | |
# convertVideo.sh | |
# --------------- | |
# This script converts the original, high quality recording to a much smaller | |
# and lower quality file for archiving purposes. | |
# --------------- | |
# Author: @LucaTNT | |
# License: BSD | |
# Define some paths |
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 | |
# recordCam.sh | |
# ------------ | |
# This script saves the live video from the Foscam IP camera to a full-quality mp4 file. | |
# I chose to split the files every 15 minutes (900 seconds), to quickly find the time I need. | |
# Note: audio is not saved as my cameras don't have a microphone connected to them. | |
# ----------- | |
# Author: @LucaTNT | |
# License: BSD |
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 |
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 |
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 |
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); |