- apply manifests
- run kubeconfiggen.sh
- use registry-cleaner.kubeconfig:
KUBECONFIG=/root/registry-cleaner.kubeconfig kubectl get pods -A
This file contains hidden or 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 re | |
alloclist = requests.get("https://ftp.ripe.net/ripe/stats/membership/alloclist.txt") | |
def splitter(text): | |
splitted = {} | |
current_company = [] | |
for i in text.split("\n"): | |
if i == '': continue | |
if re.match("([A-z][A-z])\.(.*)", i): # means processing a new block | |
current_company = splitted[i] = [] |
This file contains hidden or 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 hidden or 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
<VirtualHost *:{{ http_port }}> | |
ServerAdmin webmaster@localhost | |
ServerName {{ http_host }} | |
ServerAlias www.{{ http_host }} | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
DocumentRoot "/var/www/{{ http_host }}" | |
</VirtualHost> |
This file contains hidden or 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: |
This file contains hidden or 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]; |
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 hidden or 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 hidden or 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" |
This file contains hidden or 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"', |