Skip to content

Instantly share code, notes, and snippets.

View franky47's full-sized avatar

François Best franky47

View GitHub Profile
@franky47
franky47 / .zshrc
Last active November 15, 2022 20:34
# The following lines were added by compinstall
# zstyle ':completion:*:descriptions' format '%B%d%b'
# zstyle ':completion:*:messages' format '%d'
# zstyle ':completion:*:warnings' format 'No matches for: %d'
# zstyle ':completion:*' group-name ''
# zstyle ':completion:*' group-name ''
# zstyle ':completion:*' ignore-parents parent pwd .. directory
# zstyle ':completion:*' insert-unambiguous true
# zstyle ':completion:*' list-colors ''
@franky47
franky47 / 00-header
Last active July 1, 2016 07:49
RasPi 3 Dynamic MOTD à la Ubuntu
#!/bin/bash
#
# 00-header - create the header of the MOTD
# Copyright (c) 2013 Nick Charlton
# Copyright (c) 2009-2010 Canonical Ltd.
#
# Authors: Francois Best <[email protected]>
# Nick Charlton <[email protected]>
# Dustin Kirkland <[email protected]>
#
@franky47
franky47 / noteBuffer.cpp
Last active October 29, 2016 06:38
Snippet for Neil
#include <iostream>
#include <inttypes.h>
#include <cstring>
#define _STRINGIFY(LitteralString) #LitteralString
#define STRINGIFY(LitteralString) _STRINGIFY(LitteralString)
#define ASSERT(expr) \
{ \
if (!(expr)) \
{ \
@franky47
franky47 / robothash-env.sh
Created September 20, 2017 04:54
Get a robotic avatar of your environment variables setup
#!/usr/bin/env bash
# This simple line lists your environment variables,
# hashes them into a SHA-1 and uses that to query a "unique"
# robotic avatar from robohash.org.
#
# This lets you see quickly if something is out of place in
# a server configuration, as any slight change of the config
# will result in a totally different image, which is easier
# to catch at a glimpse than remembering checksums.
@franky47
franky47 / front-end-url-farm.md
Last active December 26, 2017 13:17
Front-End URL Farm

Keybase proof

I hereby claim:

  • I am franky47 on github.
  • I am franky47 (https://keybase.io/franky47) on keybase.
  • I have a public key whose fingerprint is 4A13 03D1 C816 DF95 5713 661E ED1B 3C13 7048 076B

To claim this, I am signing this object:

@franky47
franky47 / hosts
Last active December 7, 2018 08:05
Block undesired web services from even resolving their DNS
# Block Facebook IPv4
0.0.0.0 www.facebook.com
0.0.0.0 facebook.com
0.0.0.0 login.facebook.com
0.0.0.0 www.login.facebook.com
0.0.0.0 fbcdn.net
0.0.0.0 www.fbcdn.net
0.0.0.0 fbcdn.com
0.0.0.0 www.fbcdn.com
0.0.0.0 static.ak.fbcdn.net
@franky47
franky47 / interesting-web-services.md
Last active June 1, 2023 16:06
Interesting web services

Interesting web services

A semi-curated list of SaaS, platforms and web-based tools for software development.

Analytics

  • Chiffre - End-to-end encrypted analytics (shameless plug)
  • Matomo - Self-hostable alternative to Google Analytics

Cartography

@franky47
franky47 / list-of-lists.md
Created January 11, 2019 08:18
List of lists
@franky47
franky47 / .zprofile
Created February 3, 2019 12:51
System status MOTD for Raspberry Pi (with ZSH)
# Inspiration: https://www.raspberrypi.org/forums/viewtopic.php?t=23440
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
let secs=$((${upSeconds}%60))
let mins=$((${upSeconds}/60%60))
let hours=$((${upSeconds}/3600%24))
let days=$((${upSeconds}/86400))
UPTIME=`printf "%d days, %dh %dm %ds" "$days" "$hours" "$mins" "$secs"`
# get the load averages