Skip to content

Instantly share code, notes, and snippets.

View Zorono's full-sized avatar
😌
I may be slow to respond.

John Magdy Lotfy Kamel Zorono

😌
I may be slow to respond.
View GitHub Profile
@Zorono
Zorono / WebRequests.cs
Last active May 11, 2020 03:11 — forked from zmilojko/gist:5756502
Here is how you can make C# WebRequests asynchronously. The version on MSDN is overcomplicated and utterly sucks. This one is minimal and doesn't suck.
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Guoxun Yang and Zeljko Milojkovic wrote this file. As long as you retain this
* notice you can do whatever you want with this stuff. If we meet some day, and
* you think this stuff is worth it, you can buy us beer in return.
* ----------------------------------------------------------------------------
*/
using System;
@Zorono
Zorono / github-troll.md
Created October 27, 2020 22:41 — forked from lrvick/github-troll.md
Trolling Github's DMCA repo with their own security flaws.
@Zorono
Zorono / .bash_aliases
Created December 24, 2021 01:42 — forked from vratiu/.bash_aliases
Git shell coloring
# 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 / download_page_photos.py
Created January 29, 2022 19:34 — forked from pcardune/download_page_photos.py
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..."
urlretrieve('https://raw.github.com/facebook/fbconsole/master/src/fbconsole.py',
@Zorono
Zorono / README.md
Created February 2, 2022 12:53 — forked from renestalder/README.md
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
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

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

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 / gpsroute.inc
Created October 14, 2022 17:36
Simple GPS Route using player gang zones
#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.
#!/bin/bash
#
# Author: Peter Maloney
# License: GPLv2
backed_up=false
now=$(date +%s)
file=/etc/ssh/sshd_config
support_applications=()
pubkeyonly=false
@Zorono
Zorono / ubuntu-hardening.md
Created December 3, 2022 17:21 — forked from dfedorov-ciena/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean