Skip to content

Instantly share code, notes, and snippets.

View mobeigi's full-sized avatar
💙
Develop with heart

Mo Beigi mobeigi

💙
Develop with heart
View GitHub Profile
@mobeigi
mobeigi / mysql_dumpall.sh
Created November 9, 2017 15:42
MySQL Dump All Databases
#!/bin/bash
TIMESTAMP=$(date +"%F")
BACKUP_DIR="/root/mysql/$TIMESTAMP"
MYSQL_USER="root"
MYSQL=/usr/bin/mysql
MYSQL_PASSWORD="REMOVED"
MYSQLDUMP=/usr/bin/mysqldump
mkdir -p "$BACKUP_DIR/mysql"
@mobeigi
mobeigi / vac_ban_checker.py
Created October 21, 2017 05:19
Vac Ban Checker (scraper)
#!/usr/bin/env python
import requests, re
from bs4 import BeautifulSoup
num_vac_bans = 0
num_game_bans = 0
num_punished = 0
total = 0
@mobeigi
mobeigi / cruelhackers_scraper.py
Created November 20, 2016 08:40
SQL injection example for cruelhackers.net
import requests, re, os
START_NUM = 0
#Create dump file
file = open('db_dump.txt', 'a+')
count = 0
while True:
@mobeigi
mobeigi / gist:a9daf4ad088aacec9148382e1b85381e
Created May 31, 2016 10:53
php missing Australia/Sydney
Code:
$timezone_identifiers = DateTimeZone::listIdentifiers();
for ($i=0; $i < sizeof($timezone_identifiers); $i++) {
echo "$timezone_identifiers[$i]<br />";
}
Prints:
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
% Testing for: Assignment 1 - Prolog Programming
% Mohammad Ghasembeigi (z3464208)
% Date: 04/04/2016
% Based on: https://www.cse.unsw.edu.au/~billw/testing.html
% How to test:
% $ swipl -s ass1.pl < ass1_tests.pl
% Then manually compare expected answer with the result on the line underneath (program answer)
% Important Note:
@mobeigi
mobeigi / cpu_util.sh
Created November 26, 2015 10:34
CPU utilization sniplet for Linux
# Instantly print out CPU utilization at current time as a floating point
echo print `top -n 1 | tr -s " " | cut -d$" " -f10 | tail -n +8 | head -n -1 | paste -sd+ | bc`/ `nproc` | python
@mobeigi
mobeigi / LoL RADS Registry Fixer.bat
Last active October 28, 2015 06:08
LoL RADS Registry Fixer
@echo off
setlocal enabledelayedexpansion
cls
echo ----------------------------------------------
echo LoL RADS Registry Fixer by PersianMG (https://github.com/mohammadg)
echo ----------------------------------------------
:: Ask for 64bit or 32 bit
:getArch
@mobeigi
mobeigi / gist:1e3474ac5f761db6305c
Created May 30, 2015 20:28
Adding SSL cert to Azure Website From Namecheap
1. Download IIS manager
2. Run IIS -> Local PC -> Server Certificates
3. Generate CRC -> Create Certificate Request
4. Send CRC to auth server, get .cer file in return
5. Rename .cer file to .p7b
6. Open p7b file in certmgr application
7. View all certificate, select domain certificate and export cerificate as .CER file
8. Open IIS -> Local PC -> Server Certificates -> Complete certificate request
9. Provide recently exported .CER file (in step 7)
10. Select new certificate and export to .pfx file (provide password as needed).
@mobeigi
mobeigi / Falchion.txt
Created May 27, 2015 11:59
Falchion Skin Codes
"Rocket Pop"
{
"paint" "478"
}
"Bunsen Burner"
{
"paint" "479"
}
"Ranger"
{
@mobeigi
mobeigi / Ducky_Shine_Multimedia.ahk
Created May 1, 2015 17:09
Ducky Shine III Multimedia Key Autohotkey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;Multimedia Keys for Ducky Shine 3
;Open selected file using notepad++
SC121::run % "D:\Program Files (x86)\Notepad++\notepad++.exe """ gst() """"