Skip to content

Instantly share code, notes, and snippets.

@ali-essam
ali-essam / terminator-quake-config
Last active September 26, 2021 14:21
Terminator quake style configuration file
# ~/.config/terminator/config
[global_config]
always_on_top = True
borderless = True
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
handle_size = 1
sticky = True
suppress_multiple_term_dialog = True
tab_position = bottom
[keybindings]
@ali-essam
ali-essam / restart_zte_h108n.sh
Created September 24, 2016 20:26
bash script to restart zte h108n router
#!/bin/bash
USER='yourusername'
PASS='yourpassword'
function login {
local __resultvar=$1
local FRMTOKEN=$(curl -s 'http://192.168.1.1/' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,ar;q=0.6,ru;q=0.4' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.92 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Connection: keep-alive' --compressed | grep "(\"Frm_Logintoken\").value = \"[0-9]*\"" | grep -o "[0-9]*")
echo "Frm_Logintoken=$FRMTOKEN"
curl -s 'http://192.168.1.1/' -H 'Origin: http://192.168.1.1' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8,ar;q=0.6,ru;q=0.4' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.92 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -
@ali-essam
ali-essam / install
Last active October 3, 2016 09:41
Get Vodafone EG USB quota and notify user
curl 'https://gist.githubusercontent.com/ali-essam/7ab5768370a701142cc936e597e8ed48/raw/8f2e50f2f43061135fe65dc857ced39a275cca49/vodafonequota' | sudo tee /etc/network/if-up.d/vodafonequota > /dev/null
sudo chmod +x /etc/network/if-up.d/vodafonequota
echo "Vodafone Quota Notifier Setup Successfully"
@ali-essam
ali-essam / TP-Link_TD854W_Reboot_Script.py
Created February 23, 2016 20:08
Reboot TP-Link TD854W Router
@ali-essam
ali-essam / Clean Flash Drive.bat
Last active August 29, 2015 14:21
Cleans portable flash drives from common flash drive viruses, and unhides files and directories.
:: Author: Ali Essam (https://github.com/ali-essam)
echo off
echo Remember to run this script as Adminstrator
echo Make sure to put this batch in the root directory of the flash drive
echo Working dir: "%~dp0"
echo %~nx0
cd /d %~dp0
echo.