Skip to content

Instantly share code, notes, and snippets.

View MohamedElashri's full-sized avatar

Mohamed Elashri MohamedElashri

View GitHub Profile
@jasonruyle
jasonruyle / UFW_ban_country.md
Last active February 26, 2026 08:26
UFW to block countries
@OmeGak
OmeGak / cern_afs_kerberos.md
Last active July 7, 2024 11:08
Authentication at CERN made not-an-ordeal (kind of)

AFS Kerberos at CERN

"Kerberos is not the authentication system CERN deserves, but the one we need". - A wise man

This guide aims to ease the pain of setting up Kerberos authentication in your local (Ubuntu) machine and then completely forget about it.

Ready to fight?

First of all, install the following packages if you want to be successful on this journey:

@roachhd
roachhd / README.md
Last active May 14, 2026 18:23
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@ssskip
ssskip / ISO3166-1.alpha2.json
Last active May 25, 2026 05:06
json of country codes (ISO 3166-1 alpha-2) and corresponding names
{
"AF": "Afghanistan",
"AX": "Aland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
@jyoshida-sci
jyoshida-sci / README.md
Last active January 18, 2022 21:42
ROOT macros. validated by ROOT 5.34/24

#ROOT Macros

##TNtuple_TH1D.c How to make a 2d-scatter-plot and a 1d-projected-histogram.

##pyroot_demo.py How to draw a graph of f(x) = abs(sin(x)/x).

##randomnumber.c

GL-iNet pocket router

The following steps will help you configure a GL-iNet router running a version of linux called OpenWRT so that you can do real-time WiFi Probe Request capture. By using multiple of these GL-iNet devices you can easily create a perimeter for WiFi tracking.

create destination on the usb drive

mkdir /mnt/sda1/packages
echo dest usb /mnt/sda1/packages/ >> /etc/opkg.conf

Filesystem

@squarism
squarism / iterm2.md
Last active May 23, 2026 18:34
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
@0xDE57
0xDE57 / config.md
Last active May 12, 2026 08:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@deviantony
deviantony / install-latest-compose.sh
Last active January 30, 2026 00:58
Install latest version of Docker Compose
#!/bin/bash
## THIS IS THE OLD WAY
## Nowadays, simply follow the Compose installation instructions in the official documentation:
## https://docs.docker.com/compose/install/
# get latest docker compose released tag
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
#!/usr/bin/env python
"""
Go through TeX files and count words, plot things.
TODO:
- improve timezone handling
- only count commits where tex file changed?
- add PDF pagecount?
"""