Skip to content

Instantly share code, notes, and snippets.

View AndreVallestero's full-sized avatar
🦀

Andre Vallestero AndreVallestero

🦀
View GitHub Profile
@AndreVallestero
AndreVallestero / optimized.hideout
Created December 22, 2023 17:03
Optimized hideout for Path of Exile
{
"version": 1,
"language": "English",
"hideout_name": "Stately Hideout",
"hideout_hash": 31968,
"doodads": {
"Stash": {
"hash": 3230065491,
"x": 268,
"y": 250,
@AndreVallestero
AndreVallestero / seo_pwa.html
Last active October 29, 2023 15:39
SEO Tags and PWA tags for HTML
<!DOCTYPE html>
<html lang=en>
<head>
<meta http-equiv=content-type content="text/html;charset=UTF-8">
<!--SEO tags -->
<title>My Page Title</title>
<meta name="description" content="Benchmarks for measuring the performance of GUI toolkits">
<meta name="keywords" content="my, key, words, key words, keywords">
<meta name="twitter:card" content="summary">
#!/bin/bash
#
# Expects two arguments: a pip package and a target directory. Installs the pip
# package and removes unnecessary build artifacts from the resulting package.
#
# See documentation on ./build-layers.sh for more information.
set -e
set -x
import json, csv
K = 32 # ELO constant (adjust as needed)
def expected_win_probability(rating1, rating2):
return 1 / (1 + 10 ** ((rating2 - rating1) / 400))
with open("league_starting_elo_map_v1.csv", "r") as f:
starting_elos = list(csv.reader(f))[1:]
@AndreVallestero
AndreVallestero / .eslintrc.json
Last active June 20, 2023 02:11
SolidJS + TypeScript + ESLint + Prettier setup
// env should be changed depending on the target environment
// plugin:@typescript-eslint/strict and @typescript-eslint/recommended-requiring-type-checking might need to be dropped depending on how much friction it causes
// "endOfLine" : "auto" is added to accommodate windows devs
{
"env":{"browser":true},
"extends":[
"eslint:recommended",
"airbnb-base",
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
@AndreVallestero
AndreVallestero / floor_space.py
Created December 5, 2022 01:12
calculate floor space from realtor.ca listings
lines = []
user_input = "a"
print("Input realtor.ca room dimensions in meters (put empty line when done): ")
while (len(user_input.strip()) > 0):
user_input = input()
lines.append(user_input)
total = 0
for line in lines:
if len(line) < 1 or not line[0].isnumeric(): continue
@AndreVallestero
AndreVallestero / tiny-svg-guide.md
Last active March 16, 2024 18:09
Tiny SVG guide
@AndreVallestero
AndreVallestero / heic_to_jpg.bat
Created November 5, 2022 03:37
imagemagick recursive heic to jpg
FOR /R %%a IN (*.HEIC) DO magick "%%~a" -quality 80%% "%%~dpna.jpg"
@AndreVallestero
AndreVallestero / Propeller_RFC.html
Last active October 27, 2022 20:40
PROPELLER: Pr​ofile Guided ​Op​timizing​ L​arge Scale L​LVM-based ​R​elinker
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style>body{margin-left:0;margin-right:0;margin-top:0}#bN015htcoyT__google-cache-hdr{background:#f8f9fa;font:13px arial,sans-serif;text-align:left;color:#202124;border:0;margin:0;border-bottom:1px solid #dadce0;line-height:16px;padding:16px 28px 24px 28px}#bN015htcoyT__google-cache-hdr *{display:inline;font:inherit;text-align:inherit;color:inherit;line-height:inherit;background:none;border:0;margin:0;padding:0;letter-spacing:0}#bN015htcoyT__google-cache-hdr a{text-decoration:none;color:#1a0dab}#bN015htcoyT__google-cache-hdr a:hover{text-decoration:underline}#bN015htcoyT__google-cache-hdr a:visited{color:#681da8}#bN015htcoyT__google-cache-hdr div{display:block;margin-top:4px}#bN015htcoyT__google-cache-hdr b{font-weight:bold;display:inline-block;direction:ltr}</style></head>
<body class="vsc-initialized" vlink="blue" link="blue" bgcolor="#ffffff"><div id="bN015htcoyT__google-cache-hdr">
<meta http-equiv="Content-Type" content="text/
@AndreVallestero
AndreVallestero / git_activity.py
Created September 20, 2022 13:03
Count number of commits and unique contributors in the past year
from pydriller import Repository
from datetime import datetime
commits = 0
contributors = set()
now = datetime.now().astimezone()
for commit in Repository('https://github.com/olive-editor/olive.git').traverse_commits():
if ((now - commit.author_date).days > 365): continue
contributors.add(commit.author.email)