Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

John Magdy Lotfy Kamel Zorono

I may be slow to respond.
View GitHub Profile
Zorono / curl_example.cpp
Created January 15, 2023 23:08 — forked from alghanmi/curl_example.cpp
cURL C++ Example
View curl_example.cpp
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
Zorono /
Created December 3, 2022 17:21 — forked from dfedorov-ciena/
List of things for hardening Ubuntu
# Author: Peter Maloney
# License: GPLv2
now=$(date +%s)
Zorono /
Created October 14, 2022 17:36
Simple GPS Route using player gang zones
#if defined __INC_GPS_ROUTE_
#define __INC_GPS_ROUTE_
GPS Route Include by NaS
Shows a route on the radar from the player's location to the specified destination using per-player gang zones.

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.


  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.

Zorono /
Created March 3, 2022 02:11 — forked from mutin-sa/
List of Top Public Time Servers
Zorono /
Created February 2, 2022 12:53 — forked from renestalder/
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.

Zorono /
Created January 29, 2022 19:34 — forked from pcardune/
Download Facebook Page Photos
#!/usr/bin/env python
import os.path
import os
from urllib import urlretrieve
import imp
print "starting up, hang with me..."
Zorono / .bash_aliases
Created December 24, 2021 01:42 — forked from vratiu/.bash_aliases
Git shell coloring
View .bash_aliases
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart -
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
Zorono / clean-junk
Last active March 19, 2023 23:35
View clean-junk
#!/usr/bin/env bash
if [[ ! $EUID -eq 0 ]]; then
echo "ERROR: You're not running as root!"
exit 1
echo "Clearing snapd Cache..."
rm -rvf /var/lib/snapd/cache/**