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 grid = document.querySelector(".problem-container"); | |
function solve1() { | |
let problems = grid.querySelectorAll(".problem-wrapper"); | |
problems.forEach(p => { | |
let digits = p.querySelector(".digits"); | |
if (digits.classList.contains("isProblem")) { | |
let binary = p.querySelector(".bits").textContent; | |
let decimal_string = binaryToDecimal(binary).toString(); | |
// console.log("decimal_string: " + decimal_string); |
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
for(let i=0; i<100; i++) { | |
console.log((i%3==0 && "Fizz" || "") + (i%5==0 && "Buzz" || "") + (( (i%5 != 0 && i%3 !=0) && ""+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
#!/bin/bash | |
# You need a CSRF Token, an Authorization Cookie and your Proxmox URL | |
# | |
# By default, it WIPES ALL DISKS from a to z, you'll probably need to change that, and exclude at least your boot disks :) | |
PROXMOX_FQDN="" | |
AUTH_COOKIE="" | |
CSRF="" | |
for disk_letter in {a..z} |
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/python3 | |
# source: https://moonbooks.org/Articles/How-to-remove-unused-css-using-google-chrome-and-python-/ | |
from fileinput import filename | |
import json | |
with open('Coverage.json') as json_data: | |
raw_code_coverage_list = json.load(json_data) | |
file_name = 'bootstrap_full.css' |
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 | |
# Script that creates unique deploy keys for each local git repo that you push or clone | |
# It allows usage of multiple deploy keys on the same machine. | |
# Usage: gitdeploy.sh clone/push/add <remote-ssh-url> | |
# Arguments | |
if [[ -z $1 || -z $2 ]] | |
then | |
echo "Missing argument. Usage: gitdeploy.sh clone/push/add <remote-ssh-url>" | |
exit 1 |
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 | |
# Usage : ffcert.sh <certfile.pem> | |
# Opens certificate chain from given file in firefox certificate inspector gui. | |
firefox "about:certificate?cert=\ | |
`cat $1 | grep -v CERTIFICATE | tr -d "\n" | sed -e "s/\//%2F/g" -e "s/+/%2B/g" -e "s/=/%3D/g"`" |
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
# Command that updates your session on Wifirst's captive portal | |
# replace <id> with your user ID, and <hash> with your password hash. | |
# Both can be found in the network inspection tab of your browser when connecting manually to the portal. | |
# | |
# You may also want to change the ip 10.189.0.1 to your gateway ip address (found with `ip route | grep default`) | |
# | |
wget --post-data="username=GUEST/end_user_<id>@wifirst.net&password=<hash>&success_url=http://127.0.0.1/&error_url=http://127.0.0.1/&update_session=0"\ | |
https://10.189.0.1:8090/goform/HtmlLoginRequest --no-check-certificate |