Skip to content

Instantly share code, notes, and snippets.

View Askill's full-sized avatar
🏠
Working from home

Patrice Matz Askill

🏠
Working from home
View GitHub Profile
@Askill
Askill / mirror.py
Created March 5, 2024 18:28
mirror all starred git repos to your private git server
import os
import subprocess
import requests
# Replace with your GitHub token
GITHUB_TOKEN = ''
# Replace with your private Git server's HTTPS URL
PRIVATE_GIT_SERVER = 'https://user_name:pat@domain/user_name/'
GIT_SERVER_USERNAME = 'john'
@Askill
Askill / logg_stress.py
Created November 3, 2023 08:59
stress test for logging
#!/bin/python
import argparse
import asyncio
import datetime
from multiprocessing import Pool
async def write(i):
while True:
print(f"{i} {str(datetime.datetime.now())}")
function OpenSections() {
console.log('Opening Sections...');
var index = 0;
var sectionPush = document.querySelectorAll('.js-panel-toggler')
var sectionHidden = document.querySelectorAll('.panel--content-wrapper--1g5eE')
sectionHidden.forEach((item) => {
const hidden = item.getAttribute('aria-hidden');
if (hidden == "true") {
sectionPush[index].click();
}
#! /bin/bash
fileName="/home/john/speed-log/speed_log.txt"
echo "$(speedtest-cli --csv --csv-delimiter ';')" >> $fileName
@Askill
Askill / format_json.py
Last active April 13, 2022 21:03
format large json files
import json
inp = ""
out = ""
with open(inp, "r", encoding="utf-8") as f:
with open(out, "w", encoding="utf-8") as f2:
json.dump(json.load(f), f2, indent=2, ensure_ascii=False)