Skip to content

Instantly share code, notes, and snippets.

View Kianda's full-sized avatar

Kianda Kianda

  • Veneto, Italy
  • 04:34 (UTC +02:00)
View GitHub Profile
@jafstar
jafstar / radio_streams.txt
Last active May 10, 2024 08:57
Radio Streams
//ABC JAZZ
//mp3: "http://listen.radionomy.com/abc-jazz"
//FRISKY FM
//mp3: "http://scfire-mtc-aa02.stream.aol.com:80/stream/1015"
http://stream2.friskyradio.com:8000/frisky_mp3_hi
http://chill.friskyradio.com/friskychill_mp3_high
//WWOZ
//mp3: "http://wwoz-sc.streamguys.com/wwoz-hi.mp3"
@gravelld
gravelld / rescan-tags.scpt
Created August 15, 2017 10:35
An AppleScript that refresh's iTunes' stored metadata from the selected music files.
tell application "iTunes"
set sel to selection
if sel is {} then return
repeat with aTrack in sel
if class of aTrack is file track then refresh aTrack
end repeat
end tell
@robinsloan
robinsloan / shh.rb
Last active August 18, 2023 12:09
Disable RTs from all the people you follow on Twitter.
require "rubygems"
require "twitter"
# get these from apps.twitter.com
CONSUMER_KEY = "foo"
CONSUMER_SECRET = "bar"
OAUTH_TOKEN = "blee"
OAUTH_TOKEN_SECRET = "baz"
TWITTER_USER = "your_username" # needs to be the one associated with keys above
@lldld
lldld / go2 error handling feedback.md
Last active January 19, 2022 20:10
go2 error handling feedback

Import symbol ! to passthrough errors

! is abbreviation of not nil

For example, to call function Sub in caller

func Sub(...) (T1, T2, error) {...}
@metalogico
metalogico / italy_regions_provinces_cities_istat_2020.sql
Last active December 11, 2020 13:44
Comuni, Province e Regioni Italiane SQL -Cities, Provinces and Regions in Italy SQL - Update ISTAT 2020
# Dump of table italy_regions
# ------------------------------------------------------------
DROP TABLE IF EXISTS `italy_regions`;
CREATE TABLE `italy_regions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `italy_regions_name_unique` (`name`)