Skip to content

Instantly share code, notes, and snippets.

View andreaganduglia's full-sized avatar

Andrea Ganduglia andreaganduglia

View GitHub Profile
@andreaganduglia
andreaganduglia / disneyplus-on-linux.js
Created November 10, 2022 10:34
A Tampermonkey script to watch Disney+ on Linux
// ==UserScript==
// @name DisneyPlus on Ubuntu
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Set custom navigator.userAgent
// @author Andrea Ganduglia - Based on https://gist.github.com/moehlone/bed7dd6cb38fc55bd640
// @match https://www.disneyplus.com/*
// @grant none
// ==/UserScript==
@andreaganduglia
andreaganduglia / all.csv
Created October 23, 2019 12:51
ISO-3166-Countries-with-Regional-Codes
name alpha-2 alpha-3 country-code iso_3166-2 region sub-region intermediate-region region-code sub-region-code intermediate-region-code
Afghanistan AF AFG 004 ISO 3166-2:AF Asia Southern Asia 142 034
Åland Islands AX ALA 248 ISO 3166-2:AX Europe Northern Europe 150 154
Albania AL ALB 008 ISO 3166-2:AL Europe Southern Europe 150 039
Algeria DZ DZA 012 ISO 3166-2:DZ Africa Northern Africa 002 015
American Samoa AS ASM 016 ISO 3166-2:AS Oceania Polynesia 009 061
Andorra AD AND 020 ISO 3166-2:AD Europe Southern Europe 150 039
Angola AO AGO 024 ISO 3166-2:AO Africa Sub-Saharan Africa Middle Africa 002 202 017
Anguilla AI AIA 660 ISO 3166-2:AI Americas Latin America and the Caribbean Caribbean 019 419 029
Antarctica AQ ATA 010 ISO 3166-2:AQ
@andreaganduglia
andreaganduglia / sheldon.txt
Created June 7, 2019 09:35
Best Sheldon quote ever!
S: You said he didn't create the sun until day four.
C: Yeah.
S: So how could there be light the first three days?
C: God is light.
S: So God's a photon?
C: God's what made photons possible.
S: And what day did he do that?
C: I would think day one. Because the first day had just begun.
S: So, before the Big Bang?
C: There was no Big Bang. There was only the Word.
@andreaganduglia
andreaganduglia / random-image.php
Created April 30, 2019 12:06
Create image with solid background and random polygons with PHP and GD Library
<?php
// set image width and height
$w = 400;
$h = 300;
// randoms coords for polygons
$coords = [];
foreach(range(0,127) as $p){
$coords[] = rand(0,$w);
@andreaganduglia
andreaganduglia / keygen.sh
Created April 26, 2019 09:05
BASH - Generate a random string base64 encoded. Useful for generate keys.
#!/bin/bash
dd if=/dev/urandom bs=1024 count=1 status=none | base64
# You can adjust length simply change `bs' value.
@andreaganduglia
andreaganduglia / redis-php-session-handler-on-debian7.md
Last active April 24, 2019 14:30
LAMP - Set Up a Redis Server as a Session Handler for PHP on Debian 7 Wheezy

1. Add archive repository (Debian Wheezy is currently unsupported)

# echo 'deb http://archive.debian.org/debian wheezy main contrib non-free' >> /etc/apt/sources.list
# apt-get update

2. Install Redis server and PHP Redis module via PECL