Skip to content

Instantly share code, notes, and snippets.

Avatar
😌
I may be slow to respond.

John Magdy Lotfy Kamel Zorono

😌
I may be slow to respond.
View GitHub Profile
@Zorono
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
Zorono / ubuntu-hardening.md
Created December 3, 2022 17:21 — forked from dfedorov-ciena/ubuntu-hardening.md
List of things for hardening Ubuntu
View ubuntu-hardening.md
View bc-ssh-security-autoconfig.sh
#!/bin/bash
#
# Author: Peter Maloney
# License: GPLv2
backed_up=false
now=$(date +%s)
file=/etc/ssh/sshd_config
support_applications=()
pubkeyonly=false
@Zorono
Zorono / gpsroute.inc
Created October 14, 2022 17:36
Simple GPS Route using player gang zones
View gpsroute.inc
#if defined __INC_GPS_ROUTE_
#endinput
#else
#define __INC_GPS_ROUTE_
#endif
/*
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.
View recover-deleted-files-ext4.md

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.

Important

  • 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
Zorono / Public_Time_Servers.md
Created March 3, 2022 02:11 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers
View Public_Time_Servers.md
@Zorono
Zorono / README.md
Created February 2, 2022 12:53 — forked from renestalder/README.md
Unfollow all on Facebook
View README.md

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
Zorono / download_page_photos.py
Created January 29, 2022 19:34 — forked from pcardune/download_page_photos.py
Download Facebook Page Photos
View download_page_photos.py
#!/usr/bin/env python
import os.path
import os
from urllib import urlretrieve
import imp
print "starting up, hang with me..."
urlretrieve('https://raw.github.com/facebook/fbconsole/master/src/fbconsole.py',
@Zorono
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 - http://MediaDoneRight.com
# SETUP CONSTANTS
# 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
Zorono / clean-junk
Last active March 19, 2023 23:35
whatever...
View clean-junk
#!/usr/bin/env bash
if [[ ! $EUID -eq 0 ]]; then
echo "ERROR: You're not running as root!"
exit 1
fi
echo "Clearing snapd Cache..."
rm -rvf /var/lib/snapd/cache/**