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 / 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 <farbod.ps@gmail.com>
# 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.
#
@farbod-s
farbod-s / fix_mac_app.sh
Last active November 3, 2023 00:48
How to Fix App “is damaged and can’t be opened. You should move it to the Trash” Error on Mac
# Bypass MacOS Gatekeeper
#------------------------
#usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...]
# xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...]
# xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...]
# xattr -d [-r] [-s] attr_name file [file ...]
# xattr -c [-r] [-s] file [file ...]
# First, you must get the previous commit sha, the one before the forced push:
## Hit through terminal
curl -u <username> https://api.github.com/repos/:owner/:repo/events
# Then you can create a branch from this sha:
## Hit through terminal
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs