Skip to content

Instantly share code, notes, and snippets.

View gioxx's full-sized avatar
☮️
I do things, I see people, I write.

Giovanni Francesco Solone gioxx

☮️
I do things, I see people, I write.
View GitHub Profile
@flodolo
flodolo / index.php
Created November 13, 2017 19:17
Install local XML files
<?php
$full_url = "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>Install searchplugins</title>
<script type="text/javascript">
function installSearchPlugin(pluginname) {
@salvatorecordiano
salvatorecordiano / webhook.php
Last active April 7, 2020 19:43
Sample Telegram Bot (4)
<?php
// insert here your Bot API token
define("BOT_TOKEN", "...");
$content = file_get_contents("php://input");
$update = json_decode($content, true);
if(!$update)
{
exit;
}
$message = isset($update['message']) ? $update['message'] : "";
@sharedphysics
sharedphysics / deploy-hugo-on-github.sh
Last active December 18, 2021 19:30
Automating Hugo Deployment on GitHub Pages
#!/bin/sh
############
# The following script is to help automate deployment of hugo sites on github pages.
# If you're just getting started, I recommend reading my full notes here:
# https://www.romandesign.co/setting-up-a-hugo-static-site-on-github/
#
# To run it, make sure you have made some site updates to deploy and via terminal in your backend and save the code in your hugo backend repo.
# Then type the following (no $):
#
@mburst
mburst / rss_reader.php
Created March 24, 2013 03:58
RSS Feed Reader in PHP
<html>
<head>
<title>RSS Feed Reader</title>
</head>
<body>
<?php
//Feed URLs
$feeds = array(
"http://maxburstein.com/rss",
"http://www.engadget.com/rss.xml",
@baamenabar
baamenabar / rename-with-md5sum.sh
Last active September 23, 2022 09:13
in shell bash: Read a file, get the md5 checksum, save it in a variable, make a copy of the file with the hash,
#!/bin/bash
# http://stackoverflow.com/questions/3679296/only-get-hash-value-using-md5sum-without-filename
md5HASH=($(md5sum www/app/js/bundle.js| cut -d ' ' -f 1))
cp www/app/js/bundle.js www/app/js/bundle-$md5HASH.js;
# store in variable in file
echo "<?php define('HASH_EXT', '$md5HASH'); ?>" > www/app/inc/hash-bundle.php;
@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==
@thepoppingone
thepoppingone / m3u8streamffmpegdl.sh
Last active February 27, 2023 14:32
Download m3u8 playlist with ffmpeg - step by step download script (ffmpeg binary required)
#!/bin/sh
# Author : Wang Poh Peng
# Description : Use FFMPEG to download videos into mkv or mp4 format
RED='\033[1;31m'
NC='\033[0m' # No Color
GREEN='\033[0;32m'
CYAN='\033[0;36m'
@arthurattwell
arthurattwell / userChrome.css
Last active July 3, 2023 11:51
Add numbers to Firefox tabs for easier Ctrl+n tab switching
/* userChrome.css can change the Firefox UI.
For details, see https://www.userchrome.org/
Instructions
------------
Save it to your Firefox 'Profile Folder'. To find that folder:
enter about:support in the Firefox address bar and look for it in the list.
Save this file to that folder. Then tell Firefox to load it:
enter about:config in the address bar, and search for userprof
and if that setting exists, set the following value to true:
@imsus
imsus / sample.txt
Created February 6, 2019 10:13
Telegram Instant View Boilerplate
# This sample template explores how we can turn the Telegram blog post on the left into an Instant View page as shown on the right — in several simple steps. If you're unsure what some of the elements used here do, check out the full documentation here: https://instantview.telegram.org/docs
# Place the version at the beginning of template. We recommend always using the latest available version of Instant View.
~version: "2.0"
### STEP 1: Define which pages get Instant View and which don't
# That's easy because we only need IV pages for posts on the Telegram blog.
# This *condition* does the trick.
# ?path: /blog/.+
@pixeline
pixeline / mirror_remote_directory_to_local_directory
Last active September 28, 2023 09:46
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY