Skip to content

Instantly share code, notes, and snippets.


Yazin yazinsai

View GitHub Profile
View speedUpVideos.js
const elemsIn = (tag, parent) => Array.from(parent.getElementsByTagName(tag));
const speedUp = (v) => v.playbackRate = 2;
const videos = elemsIn('video', document);
const iframes = elemsIn('iframe', document);
iframes.forEach((f) => elemsIn('video', f.contentWindow.document).forEach(speedUp));
yazinsai / parse-ayat.rb
Created Jul 5, 2020
A simple Ruby script to parse text from the Quran into text without diacritics
View parse-ayat.rb
#!/usr/bin/env ruby
# 1. Copy the raw text from
# 2. Run "ruby parse.rb"
# 3. Paste the copied text
# 4. Press "Ctrl + D" to see the output
def parse(str)
yazinsai / util.js
Created May 1, 2020 — forked from tprynn/util.js
Frida utility functions
View util.js
module.exports = {
hexStringToIntArray: function(str) {
var res = []
for(var i = 0; i < str.length; i += 2) {
res.push(parseInt(str.substring(i, i+2), 16))
return res
byteArrayToHexString: function(array) {
View CSV-to-json.rb
# people.csv
Name, Age, Height
Ahmed, 12, 103
Mohamed, 19, 176
.. into:
# people.json

PostgreSQL JSON Cheatsheet

Using JSON in Postgres by example.

Quick setup via Docker

  1. Download and install: Docker Toolbox
  2. Open Docker Quickstart Terminal
  3. Start a new postgres container:
    docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
yazinsai /
Last active Sep 6, 2020 — forked from atyachin/Android-Emulator-on-AWS-EC2.txt
Installing and running Android Emulator on Amazon AWS EC2 (Ubuntu 16.04 / m5.xlarge)

Getting the Android Emulator running on EC2 📱

# @ your EC2 instance
sudo apt update
sudo apt install openjdk-8-jre unzip
unzip -d android-sdk
sudo mv android-sdk /opt/
export ANDROID_SDK_ROOT=/opt/android-sdk
yazinsai / dl
Last active May 19, 2019
Persistently run a process over SSH even if disconnected
View dl
if test -t 1; then exec 1>/dev/null
if test -t 2; then exec 2>/dev/null
"$@" &
yazinsai /
Last active May 8, 2019 — forked from devStepsize/
POST a JSON payload to a Slack Incoming Webhook using Python requests
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
import requests
# Set the webhook_url to the one provided by Slack when you create the webhook at

Keybase proof

I hereby claim:

  • I am yazinsai on github.
  • I am yazin ( on keybase.
  • I have a public key whose fingerprint is 0D54 C43C 6D83 3AEE 0E44 32DE C193 119E 305E D218

To claim this, I am signing this object:

View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
You can’t perform that action at this time.