Skip to content

Instantly share code, notes, and snippets.

View farbod-s's full-sized avatar
🎲
Rolling Dice!

Farbod Samsamipour farbod-s

🎲
Rolling Dice!
View GitHub Profile
@farbod-s
farbod-s / Tunnel-IPV6-Local.md
Last active September 2, 2024 12:56
Transmitting IPv6 packets over existing IPv4
@farbod-s
farbod-s / voronoi_diagram.py
Created July 25, 2024 16:50
Voronoi Diagram
# Source: https://rosettacode.org/wiki/Voronoi_diagram
# Dependency: ➜ ~ pip install pillow
from PIL import Image
import random
import math
def generate_voronoi_diagram(width, height, num_cells):
image = Image.new("RGB", (width, height))
putpixel = image.putpixel
@farbod-s
farbod-s / dns.md
Last active June 14, 2024 15:04
Public DNS servers for gaming, ad-blocking, providing security and privacy.

Public DNS Servers

Provider Primary IP Secondary IP Focus
Radar 10.202.10.10 10.202.10.11 Gaming
Electro 78.157.42.100 78.157.42.101 Filtering
403 10.202.10.202 10.202.10.102 Filtering
Shecan 178.22.122.100 185.51.200.2 Filtering
Begzar 185.55.226.26 185.55.225.25 Filtering
Google 8.8.8.8 8.8.4.4 General
@farbod-s
farbod-s / background.js
Last active September 22, 2023 14:29
Chrome Extension: Copy values from Jobinja and paste to Google Sheets
const SPREADSHEET_ID = '{{SHEET_ID}}';
const SHEET_ID = 123456789;
const RANGE = 'ApplicantsList!A2:L2';
//----------------------
chrome.runtime.onConnect.addListener(port => {
port.onMessage.addListener(request => {
if (request.action === 'copyValues') {
const info = request.data;
writeToGoogleSheets(SPREADSHEET_ID, RANGE, [info[0], 'To Call / Email - 1', '', 'Jobinja', info[4], '', info[1], '', '', info[3], '', info[2]]);
}
@farbod-s
farbod-s / github_latest_downloader.sh
Created May 15, 2022 21:45
Download the latest release from Github repository
curl -s https://api.github.com/repos/google/bundletool/releases/latest \
| grep "browser_download_url.*jar" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
@farbod-s
farbod-s / firebase_admin_helper.py
Created May 4, 2022 18:28
Create application and download config file from Firebase console
# encoding=utf8
#----------
# AUTHOR: Farbod Samsamipour <[email protected]>
# GITHUB: https://github.com/firebase/firebase-admin-python
#----------
import os
import importlib.util
import plistlib as plist
import firebase_admin
from firebase_admin import credentials, project_management
#!/bin/bash
#----------
# Set variables
sl='en'
tl=''
query=''
#----------
# Get the options
while getopts ":s:t:q:" option; do
case $option in
@farbod-s
farbod-s / dialog.html
Created August 24, 2021 00:07 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<div style="font-family: sans-serif;">
<? var data = valid(); ?>
<form id="form" name="form">
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?>
<? for (var i = 0; i < data.length; i++) { ?>
<? for (var j = 0; j < data[i].length; j++) { ?>
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br>
<? } ?>
<? } ?>
<? } else { ?>
# encoding=utf8
import sys, os
import requests
import json
def t5(t, e, n, i):
return abs(float(n) * float(i) / float(t) - float(e))
def number_check(t):
return t if t > 0 else 0
#!/usr/bin/env python
# coding: utf-8
# This file is part of Adblock Plus <http://adblockplus.org/>,
# Copyright (C) 2006-2014 Eyeo GmbH
#
# Adblock Plus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#