Skip to content

Instantly share code, notes, and snippets.

View pioz's full-sized avatar
🧙‍♂️
[object Object]

Enrico pioz

🧙‍♂️
[object Object]
View GitHub Profile
@pioz
pioz / youdownloader.rb
Last active August 29, 2015 13:56
Download video as mp3 from youtube
#!/usr/bin/env ruby
require 'open-uri'
require 'cgi'
if ARGV[0].nil?
puts "usage: #{$0} YOUTUBE_VIDEO_ID"
puts " sample: #{$0} wG6G4XBnvLQ"
exit
end
@pioz
pioz / gist:8968325
Created February 13, 2014 01:55
Send imessage by command line
osascript -e 'tell application "Messages" to send "MESSAGE TEXT" to buddy "RECIPIENT_NUMBER_OR_EMAIL" of service "E:YOUR_ID_APPLE"'
@pioz
pioz / gist:737e8d2e5f6d35c72969
Created June 29, 2014 09:21
init.d script for serviio
#! /bin/sh
### BEGIN INIT INFO
# Provides: serviio
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Serviio daemon
# Description: Serviio is a free media server. It allows you to stream your media files (music, video or images) to renderer devices (e.g. a TV set, Bluray player, games console or mobile phone) on your connected home network.
### END INIT INFO
@pioz
pioz / gist:dc605517563fb3771273
Last active April 3, 2016 21:59
Concat videos with ffmpeg
ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" file/path/*.avi) -c copy output.avi
@pioz
pioz / xmas.c
Created December 25, 2014 13:34
Merry Xmas!
#include <stdlib.h>
#include <stdio.h>
int
main()
{int b=63
,l,s,p;for(
int h=0;h<b/2
+1;h++){l=h*2+1
;s=(b-l)/2;for(int
i=0;i<s;i++) printf
@pioz
pioz / naga.ahk
Last active January 11, 2022 17:00
AutoHotkey script for Naga numpad
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
NumpadIns::Numpad0
NumpadEnd::Numpad1
NumpadDown::Numpad2
NumpadPgDn::Numpad3
NumpadLeft::Numpad4
@pioz
pioz / crema.txt
Last active October 25, 2015 15:19
Ingredienti crema pasticcera
1000ml latte fresco intero
250ml panna liquida
200g zucchero
200g zucchero
100g farina
5 rossi uova
@pioz
pioz / muffin.txt
Last active November 30, 2024 10:10
Ricetta Muffin con gocce di cioccolato
Ricetta per 36 muffin
* 375g di burro
* 800g di farina
* 400g di zucchero
* 400g di latte
* 300g di gocce di cioccolato
* 6 uova
* 2 bustine di vanillina
* 2 pizzichi di sale
@pioz
pioz / rename
Created June 13, 2016 09:31
Rename image files based on date taken
jhead -autorot -nf%Y-%m-%d_%H-%M-%S *.jpg
@pioz
pioz / megiston.html
Created July 8, 2016 15:50
Megiston logo
<html>
<head>
<style>
h1.megiston {
font-family: helvetica;
font-weight: normal;
font-size: 100px;
line-height: 80%;
}
h1.megiston span {