Skip to content

Instantly share code, notes, and snippets.

var XMLbody = []; document.querySelectorAll('div.js-message_text').forEach(elm => {XMLbody.push("<div class=\"msg\">" + elm.innerHTML + "</div>")}); console.log(XMLbody.join());
@maximebories
maximebories / reset-xcode-install.md
Created August 21, 2022 00:57 — forked from Justintime50/reset-xcode-install.md
Reset Your Xcode Installation on macOS

Reset your Xcode Install on macOS

Having troubles with Xcode or their Command Line Tools? Follow this guide to reset your Xcode instance on macOS and resolve issues such as "No Xcode or CLT version detected!"

1) Check if Xcode is installed

xcode-select -print-path
# Flush curent DNS cache
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
# Start Monitoring
/Applications/DNSMonitor.app/Contents/MacOS/DNSMonitor 2>&1 | tee -a DNS.log
brew update && brew upgrade && brew cleanup && brew doctor
@maximebories
maximebories / github-page-websec.sh
Created December 18, 2022 22:08
Github-Page Basic Security
# Create the _headers file
echo "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'" > _headers
echo "Strict-Transport-Security: max-age=31536000" >> _headers
echo "X-Content-Type-Options: nosniff" >> _headers
echo "X-Frame-Options: SAMEORIGIN" >> _headers
echo "X-XSS-Protection: 1; mode=block" >> _headers
# Add the _headers file to the repository and commit the changes
git add _headers
git commit -m "Add security headers"
@maximebories
maximebories / script.js
Last active December 26, 2022 22:14
Youtube Links
document.querySelectorAll("a#video-title").forEach( (elm) => {console.log(elm)} );
@maximebories
maximebories / alias.sh
Last active January 8, 2023 20:03
Alias
alias la = "ls -a"
alias lla = "ls -la"
alias yt - ariac = youtube - dl--external - downloader aria2c--external - downloader - args "-x 16 -s 16 -k 1M"
alias brewup = "brew update && brew upgrade && brew cleanup && brew doctor";
/* System Fonts as used by GitHub */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
@maximebories
maximebories / homebrew.mxcl.aria2.plist
Last active March 30, 2023 20:13
Aria2c Homebrew Service
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.aria2</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
@maximebories
maximebories / rst_ds_store.sh
Created February 11, 2023 19:06
Reset all views options
find . -name '.DS_Store' -type f -delete