Skip to content

Instantly share code, notes, and snippets.


Mazen Alhrazi iMaz1n

View GitHub Profile

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

iMaz1n /
Created November 16, 2022 22:27 — forked from aymericbeaumet/
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to:{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
iMaz1n / Reset-Course-Progress.js
Created November 16, 2022 13:37
Udemy Reset Course Progress
View Reset-Course-Progress.js
document.querySelectorAll('li input[type=checkbox]:checked').forEach((box, i) => setTimeout(() =>, i * 50))
iMaz1n / twitter-remove-retweets.js
Created March 3, 2022 07:07 — forked from antlionguard/twitter-remove-retweets.js
With this script, you can remove all retweets you are retweeted on Twitter.
View twitter-remove-retweets.js
const timer = ms => new Promise(res => setTimeout(res, ms));
// Unretweet normally
const unretweetTweet = async (tweet) => {
await tweet.querySelector('div[data-testid="unretweet"]').click();
await timer(250);
await document.querySelector('div[data-testid="unretweetConfirm"]').click();
console.log('****// Unretweeted Successfully //****')
View iTunes Binary Rejection
May 3, 2017 at 12:34 PM
From Apple
2. 3 Performance: Accurate Metadata
4. 2 Design: Minimum Functionality
Guideline 4.2 - Design
Thank you for your resubmission. Your app continues to provide a limited user experience as it is still not sufficiently different from a mobile browsing experience. As such, the experience it provides is similar to the general experience of using Safari. Including iOS features such as push notifications, Core Location, and sharing do not provide a robust enough experience to be appropriate for the App Store.
Next Steps
iMaz1n / create-subdomain.php
Created October 17, 2021 10:30
Use API/Curl to create a new subdomain in both CloudFlare and cPanel
View create-subdomain.php
* Create Subdomains
* Note: This script was designed to be called silently by a bash script for project creation.
* Add to bash script: php "$HOME/scripts/php/create-subdomains.php" "$new_account_subdomain"
* Requires "jamesryanbell/cloudflare": "^1.11" for the CloudFlare PHP library
* Recommends "kint-php/kint": "^3.2" for improved temporary PHP debugging
iMaz1n /
Created August 9, 2021 20:33 — forked from troyfontaine/
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

iMaz1n / lowertoupper.asm
Created December 16, 2020 15:07 — forked from wohhie/lowertoupper.asm
Assembly 8086: Lower Case to Upper Case
View lowertoupper.asm

Apple Real Devices Debugging

What you need

  • certificate--which tells your devices that Apple trust you
  • a app id
  • a test device
  • a provisioning profile
iMaz1n /
Created August 1, 2020 05:53 — forked from dreikanter/
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt: