Skip to content

Instantly share code, notes, and snippets.

View thomsh's full-sized avatar
💭
🥝

Thomas thomsh

💭
🥝
View GitHub Profile
# -*- coding: utf-8 -*-
""" Deletes all tweets below a certain retweet threshold.
"""
import tweepy
from datetime import datetime
# Constants
CONSUMER_KEY = ''
@Falkor
Falkor / git-crypt-rm-gpg-user.sh
Last active February 27, 2024 16:31 — forked from glogiotatidis/remove-gpg-user.sh
Git-crypt remove user.
#!/usr/bin/env bash
#
# Script to remove GPG user (recipient) with git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
@jedisct1
jedisct1 / spectre.c
Last active January 27, 2020 04:20 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@thomsh
thomsh / install-firefox-release.sh
Last active May 16, 2023 19:23
Install latest stable binary version of firefox for desktop linux distro (tested Debian 11, proably Ubuntu too)
#!/usr/bin/env bash
# Purpose: Download and install latest stable firefox for any Linux distribution
# gpg --receive-keys 0x4360FE2109C49763186F8E21EBE41E90F6F12F6D
# Update 2021-06-03: key change, new key is signed with old 0x14F26682D0916CDD81E37B6D61B7B526D98F0353
# https://blog.mozilla.org/security/2021/06/02/updating-gpg-key-for-signing-firefox-releases/
# GPG SETTINGS
RELEASE_KEY_FINGERPRINT="0xADD7079479700DCADFDD5337E36D3B13F3D93274"
MOZILLA_KEY_SERVER="gpg.mozilla.org"
GNUPGHOME="/var/cache/gnupg_download_firefox_release"
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@eighthave
eighthave / find-https-debian-archives.py
Last active May 26, 2024 03:45
Script to find official Debian mirrors that support HTTPS
#!/usr/bin/env python3
import urllib.request
import re
import ssl
import sys
# # find generic mirrors
mirrors = urllib.request.urlopen('http://www.debian.org/mirror/list')
https = []
@plentz
plentz / nginx.conf
Last active July 2, 2024 13:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048