-
First download and install govc binary (Reference)
# extract govc binary to /usr/local/bin # note: the "tar" command must run with root permissions curl -L -o - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | tar -C /usr/local/bin -xvzf - govc
-
put this script in your .bashrc/.zshrc, replace your credentials (Lines 6 to 16)
-
Use it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
domains = open("Domains/api/getdomainsonly.json" ,"r") | |
jd = json.loads(domains.read()) | |
def get_domain_info(domain): | |
cookies = { | |
'ADD': 'YOUR_COOKIE_HERE' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
txt = requests.get("https://cinematicket.org/api/v1/cinematicket/home/movies/6062/?city=235").text | |
jdat = json.loads(txt) | |
for cinema in jdat['cinemas'][0]['cinemas']: | |
for time in cinema['halls']: | |
for session in cinema['halls'][time]['sessions']: | |
start_time = session['start_at'] | |
if start_time == "2023-10-20T19:00:00+03:30": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
file = open("issues.csv", "r") | |
text = file.read() | |
for i in re.findall(r'\".*?\"', text, flags=re.DOTALL): | |
text = text.replace(i, i.replace("\n", "'----'")) # replace \n with '----' in issue title and description | |
newf = open('issues-fixed.csv', 'w') | |
newf.write(text) | |
newf.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import time | |
headers = { | |
'authority': 'snappfood.ir', | |
'referer': 'https://snappfood.ir/search?query=%D9%86%D8%A7%D9%86%20%D8%B3%D8%AD%D8%B1&page=0', | |
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"', | |
'sec-ch-ua-mobile': '?0', | |
'sec-ch-ua-platform': '"Windows"', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#----------------- | |
# I know this is a mess, but it works | |
#----------------- | |
import xml.etree.ElementTree as ET | |
def convert_quota(kb): | |
if kb > 1024 * 1024: | |
return str(round(kb / (1024 * 1024), 2)) + " GB" | |
elif kb > 1024: | |
return str(round(kb / 1024, 2)) + " MB" |
SCALELITE_FQDN=scalelite.example.com
wget https://github.com/blindsidenetworks/scalelite/raw/master/bigbluebutton/scalelite_post_publish.rb -P /usr/local/bigbluebutton/core/scripts/post_publish
wget https://github.com/blindsidenetworks/scalelite/raw/master/bigbluebutton/scalelite.yml -P /usr/local/bigbluebutton/core/scripts
sed -i -E "s/^(spool_dir:).+/\1 bigbluebutton@$SCALELITE_FQDN:\/mnt\/scalelite-recordings\/var\/bigbluebutton\/spool/" /usr/local/bigbluebutton/core/scripts/scalelite.yml
mkdir -p /home/bigbluebutton/.ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script exports price / cost csv out of hetzner api server list | |
# Just watch requests with network tools and pass the bearer token into request headers: | |
import json | |
import requests | |
def get_servers(page=1): | |
headers = { | |
'authority': 'api.hetzner.cloud', | |
'accept': 'application/json, text/plain, */*', | |
'accept-language': 'en-US,en;q=0.9,fa;q=0.8', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var menu = document.querySelector('div[data-test="chatButton"]').parentElement; | |
var sectionDiv = document.createElement("div"); | |
var iconDiv1 = document.createElement("div"); | |
var iconDiv2 = document.createElement("div"); | |
var iconDiv3 = document.createElement("div"); | |
var iconDiv3 = document.createElement("div"); | |
var iconIcon = document.createElement("i"); | |
var textDiv = document.createElement("div"); | |
var textSpan = document.createElement("span"); | |
var meetingId = document.querySelector('svg[data-test="whiteboard"]').innerHTML.match("\/bigbluebutton\/presentation\/(.*)\/.*\/.*\/svg/")[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: JOBNAME | |
namespace: NAMESPACE | |
spec: | |
schedule: "0 3 */10 * *" | |
jobTemplate: | |
spec: | |
template: |
NewerOlder