This file contains hidden or 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 hidden or 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
#!/usr/bin/env bash | |
WEBHOOK_DESTINATION="http://localhost:3000/stripe/webhook" | |
WEBHOOK_SECRET="whsec_ENTER_YOURS_HERE" | |
if [[ ! "$#" -eq 1 ]]; then | |
echo "USAGE: $0 /path/to/event.json"; | |
exit 1; | |
fi | |
timestamp="$(date +%s)." |
This file contains hidden or 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
import requests | |
def getToken(): | |
req = requests.post("https://westeurope.api.cognitive.microsoft.com/sts/v1.0/issuetoken", | |
headers={"Ocp-Apim-Subscription-Key": "YOUR_AZURE_API_KEY_HERE"}, | |
) | |
return req.text | |
def textToMp3(text, voice="it-IT-ElsaNeural"): |
This file contains hidden or 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 hidden or 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 hidden or 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
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
if application "Spotify" is running then | |
tell application "Spotify" | |
if player state is playing then | |
return (get artist of current track) & " - " & (get name of current track) | |
else | |
return "" | |
end if |
This file contains hidden or 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
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
if application "iTunes" is running then | |
tell application "iTunes" | |
if player state is playing then | |
return (get artist of current track) & " - " & (get name of current track) | |
else | |
return "" | |
end if |
This file contains hidden or 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 hidden or 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
#!/usr/bin/env python | |
from gpiozero import LED, Button | |
from time import sleep | |
from flask import Flask | |
import datetime | |
portone = LED(25) | |
app = Flask(__name__) |
This file contains hidden or 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
tell application "Finder" | |
tell front window to update every item | |
try | |
delete (make new file at (front window) with properties {name:".refresh.tmp"}) | |
end try | |
end tell |
NewerOlder