Skip to content

Instantly share code, notes, and snippets.

View marcobellaccini's full-sized avatar

Marco Bellaccini marcobellaccini

View GitHub Profile
@marcobellaccini
marcobellaccini / fsPermAttrQuiz.md
Last active January 23, 2021 13:03
Are you sure you know file-system permissions and file attributes?
@marcobellaccini
marcobellaccini / fsPermAttrQuizAnswers.md
Last active January 23, 2021 13:00
Are you sure you know file-system permissions and file attributes?
@marcobellaccini
marcobellaccini / get_redis.sh
Last active September 20, 2018 15:10
A bash script to download and install the latest Redis stable version, also checking its hash.
#!/bin/sh
#
# A shell script to download and install the latest Redis stable
# version, also checking its hash.
# As suggested at:
# https://redis.io/download#how-to-verify-files-for-integrity
# the hash check is performed using this file:
# https://raw.githubusercontent.com/antirez/redis-hashes/master/README
#
# Author: Marco Bellaccini - marco.bellaccini[at!]gmail.com
@marcobellaccini
marcobellaccini / rawgitRedirect.rst
Last active October 14, 2022 03:21
raw.githubusercontent.com -> cdn.rawgit.com

raw.githubusercontent.com -> cdn.rawgit.com

This is a quick and dirty trick to get all HTTPS local connections to `raw.githubusercontent.com`_ being redirected to `RawGit`_ CDN (https://cdn.rawgit.com).

By using this hack, you can fool your applications into connecting to `RawGit`_ every time they try to connect to `raw.githubusercontent.com`_.

Of course, this implies that you trust `RawGit`_ to the same degree as `GitHub`_ to serve the contents.

The trick relies on a local Python script issuing HTTP redirects.