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
#!/bin/bash | |
docker stop `docker ps -q` | |
docker rm `docker ps -aq` | |
docker rmi `docker images -q` -f | |
docker rmi `docker images -q` -f # because it doesnt always work the first time | |
y | docker system prune | |
y | docker image prune | |
y | docker volume prune |
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
# Download the Windows 10 ISO | |
wget -O ~/Downloads/Windows10.iso https://software-download.microsoft.com/db/Win10_20H2_English_x64.iso?t=5f918d78-0088-47d5-adf9-8ccab64f2d3d&e=1604157841&h=675f0ae3a5a95da69c777d0d7031b8ec | |
# Mount the downloaded Windows 10 ISO | |
hdiutil mount ~/Downloads/Windows10.iso | |
# /dev/disk2 /Volumes/CCCOMA_X64FRE_EN-US_DV9 | |
# Insert the USB stick (Minimum 8GB) | |
# Find the USB volume |
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
const { execSync } = require('child_process'); | |
const { existsSync } = require('fs'); | |
const { escape } = require('querystring'); | |
const accessToken="PERSONAL_ACCESS_TOKEN"; | |
const organisation="ORG_NAME"; | |
const headers = { | |
Authorization: `Basic ${btoa(`:${accessToken}`)}`, | |
'Content-Type': 'application/json', | |
}; |
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
const { execSync } = require('child_process'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const startingDir = __dirname | |
const walkSync = (dir) => { | |
fs.readdirSync(dir).forEach(file => { | |
if (fs.statSync(path.join(dir, file)).isDirectory()) { | |
if (file === 'node_modules') return |
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
from mitmproxy import http | |
import os | |
import hashlib | |
def response(flow: http.HTTPFlow) -> None: | |
save_dir = "downloaded_images" | |
os.makedirs(save_dir, exist_ok=True) | |
content_type = flow.response.headers.get("Content-Type", "") |