Skip to content

Instantly share code, notes, and snippets.

View Gictorbit's full-sized avatar
😎

Viktor Ghorbali Gictorbit

😎
View GitHub Profile
@aHisayoshiSuehiro
aHisayoshiSuehiro / go-iptables-sample.go
Created November 6, 2017 04:04
go-iptables-sample
package main
import (
"fmt"
"reflect"
"github.com/coreos/go-iptables/iptables"
)
func contains(list []string, value string) bool {
@alirezanet
alirezanet / Iran96-97.json
Last active August 27, 2025 14:33
List of provinces, states and cities of Iran with geographical coordinates (96-97 update)
[
{
"latitude": "34° 31' 24.924",
"longitude": "50° 0' 20.866",
"province": "مرکزی",
"state": "آشتیان",
"city": "آشتیان"
},
{
"latitude": "33° 40' 29.197",
@franciscocpg
franciscocpg / README.md
Last active May 20, 2025 02:05
Import mitm certificate to CA in arch linux
  1. After installing mitmproxy run it (just type mitmproxy) in a terminal session and quit. This will create the necessaries certificates files at ~/.mitmproxy.

  2. Extract the certificate to .crt format:
    openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt

  3. Trust the certificate into CA:
    sudo trust anchor ca.crt

  4. Run the mitmproxy again

@hollemawoolpert
hollemawoolpert / README.md
Last active April 8, 2024 01:16
Simple VRP with Google Developer Resources

Binder

Simple VRP with Google Developer Resources¶

Demonstrates a solution for the simple multi-vehicle routing problem (VRP) using a combination of Google libraries and services. Sample depot and shipment locations randomly chosen in the San Antonio, TX metro area. Distances and times are based on Google's road network.

Getting Started

You will need a Google Maps Platform API Key.

Run on binder

#!/usr/bin/python
# -*- coding: utf-8 -*-
import ssl
import socket
import os
import sys
from argparse import ArgumentParser
from argparse import RawTextHelpFormatter
from threading import Thread
@joedborg
joedborg / launch_vm.sh
Last active May 14, 2025 13:29
LXD Ubuntu VM launch and disk resize
#!/bin/env bash
set -e
readonly VM="banana"
readonly CPU="8"
readonly MEM="8GB"
readonly DSK="120GB"
lxc init images:ubuntu/focal ${VM} -p default -p vm --vm
function respHandler() {
data = JSON.parse(this.responseText)
price = data.data.webengage.price
cells = document.getElementsByClassName('post-fields-item')
last = cells[cells.length - 1]
clone = last.cloneNode(true)
clone.getElementsByTagName('span')[0].innerText = 'قیمت'
clone.getElementsByTagName('div')[0].innerText = Number(price).toLocaleString()
last.parentElement.appendChild(clone)
}
@duyfken
duyfken / miui-fastboot-howto.rst
Last active January 29, 2025 20:23 — forked from j-jith/miui-fastboot-howto.rst
How to flash MIUI Fastboot ROM from Linux

How to flash MIUI Fastboot ROM from Linux

  • Download the fastboot ROM suitable for your device from the XM Firmware Updater and extract the downloaded archive
  • Download and extract the official Android SDK Platform Tools or install them using your package manager of choice.
    • If you are using the official platform tools, make sure adb and fastboot (components of platform-tools) are in your path
@ahbanavi
ahbanavi / amozeshyar_bypass_igap.user.js
Created February 20, 2021 11:05
Bypass Amozeshyar iGap code
// ==UserScript==
// @name Amozeshyar Bypass iGap
// @version 1
// @description Bypass Amozeshyar iGap code
// @author Yedoost
// @match http://stdn.iau.ac.ir/Student/captchaProcess
// @match http://stdn.iau.ac.ir/Student/manageAccount
// @grant none
// ==/UserScript==