Skip to content

Instantly share code, notes, and snippets.

View Gictorbit's full-sized avatar
😎

Viktor Ghorbali Gictorbit

😎
View GitHub Profile
@Gictorbit
Gictorbit / university-dataset.txt
Last active May 6, 2020 00:44
a db dataset sample for "dbis-uibk.github.io"
group: university
stud = {
sn:number, sname:string,city:string,avg:number,clgn:number
71133848,mohammady,tehran,17.24,10
72130502,vakili,isfahan,14.06,10
72203305,alinaghizadeh,mashhad,16.42,1
73120504,kamani,yazd,17.56,4
@Gictorbit
Gictorbit / iran-nationalcode-location.json
Created May 6, 2020 00:27
json کد شهرستان و استان برای کد ملی فایل
{
"000": {
"province": "-",
"city": "-"
},
"001": {
"province": "تهران",
"city": "تهران مرکزی"
},
"002": {
@Gictorbit
Gictorbit / lenovoDriverDownloader.py
Created August 7, 2020 02:58
a simple python script to download all dirvers for lenovo laptops
import requests
import json
from prettytable import PrettyTable
import os
def main():
baseURL='https://pcsupport.lenovo.com/us/en/api/v4/downloads/drivers?productId='
productID='laptops-and-netbooks/legion-series/legion-y540-15irh-pg0/81sy'
url=baseURL+productID
@Gictorbit
Gictorbit / article-style.css
Created October 25, 2020 16:52
GoldenDict css style to fix farsi problem
body{
font-family: "vazir";
line-height: 25px;
}
.bglrtl{
white-space: pre-wrap !important;
}
.bglrtl b{
#!/usr/bin/env python3
import requests
import bs4
from urllib.parse import unquote
import json
import getpass
def getLoginData()->dict:
global simaHost,session
@Gictorbit
Gictorbit / gtk.css
Last active March 29, 2021 04:31
GNOME 3: Tweak for thinner window title bars (~/.config/gtk-3.0/gtk.css)
window.ssd headerbar.titlebar {
min-height: 0;
padding-top: 1.4px;
padding-bottom: 1.4px;
padding-left:10px;
padding-right:10px;
}
window.ssd headerbar.titlebar button.titlebutton {
min-height: 0;
@Gictorbit
Gictorbit / dock.theme
Created February 20, 2021 13:51
plank mac os theme
#This file auto-generated by Plank.
#2019-09-02T06:32:29+0000
[PlankTheme]
#The roundness of the top corners.
TopRoundness=10
#The roundness of the bottom corners.
BottomRoundness=10
#The thickness (in pixels) of lines drawn.
LineWidth=1
@Gictorbit
Gictorbit / digikala.py
Last active March 19, 2021 22:04
digikala login and print personal information
#! /usr/bin/env python3
import requests
from bs4 import BeautifulSoup
from pprint import pprint
from furl import furl
import sys
from prettytable import PrettyTable
import getpass
def main():
func (w *WebRtcServer) CreateNewPeerConnection(offer webrtc.SessionDescription, userID uint32, sessionKey string) (
*ClientConnection, webrtc.SessionDescription, error) {
answer := webrtc.SessionDescription{}
if len(offer.SDP) == 0 || offer.Type != webrtc.SDPTypeOffer {
return nil, answer, errors.New("invalid offer")
}
if len(sessionKey) == 0 {
return nil, answer, errors.New("invalid user token")
}
@Gictorbit
Gictorbit / gpu-passthrough.md
Created March 25, 2022 19:20 — forked from MaxXor/gpu-passthrough.md
Arch GPU Passthrough Summary

Arch Linux GPU-Passthrough

A quick guide on how to setup a GPU-Passthorugh. Below are some of my Resources

The Arch Wiki is the goto place for additional information and performance tweaks like CPU-Pinning.

Requirements

  • IGPU or second dedicated GPU for Host system (unless you want to go the hard way and use one GPU for HOST and GUEST)