Skip to content

Instantly share code, notes, and snippets.

View busbina's full-sized avatar
👾
Intensifying forward firepower

Adam Busbin busbina

👾
Intensifying forward firepower
  • Seattle, WA
View GitHub Profile
@HenryHey
HenryHey / blaseballAutobet.js
Last active May 11, 2021 04:40
Blaseball auto bet to the team with the best (probably not) chance of winning
// This bookmarklet will auto bet on the team with highest odds. Or the left team if equal odds.
// I guess this saves around 20 seconds and 30 clicks of your life. You're welcome!
// 1. Create a new bookmark and give it a name
// 2. Paste the following code in the URL field
javascript:(async function () { let goBet=async e=>{length=document.getElementsByClassName("Widget-Button btn btn-success").length;for(let t=0;t<length;t++)try{document.getElementsByClassName("Widget-Button btn btn-success")[t].children[0].click(),await new Promise(t=>setTimeout(t,e)),[...document.getElementsByClassName("ModalForm-Form-Team-Percentage")].filter(e=>parseFloat(e.innerHTML)>=50)[0].click(),document.getElementsByClassName("ModalForm-Form-Inputs-Amount-Max")[0].click(),document.getElementsByClassName("ModalForm-Submit btn btn-success")[0].click(),await new Promise(t=>setTimeout(t,2*e))}catch(t){await new Promise(t=>setTimeout(t,2*e)),await goBet(500)}return"Done!"};await goBet(500); } )();
// 3. Go to https://www.blase
@JohannesHoppe
JohannesHoppe / get-form-validation-errors.ts
Last active October 18, 2023 19:54
Get all validation errors for Angular FormGroup
import { FormGroup, ValidationErrors } from '@angular/forms';
export function getFormValidationErrors(form: FormGroup) {
const result = [];
Object.keys(form.controls).forEach(key => {
const controlErrors: ValidationErrors = form.get(key).errors;
if (controlErrors) {
Object.keys(controlErrors).forEach(keyError => {
@wavezhang
wavezhang / java_download.sh
Last active May 13, 2024 13:37
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz