Skip to content

Instantly share code, notes, and snippets.

View brunolm's full-sized avatar
🏠
Working from home

BrunoLM brunolm

🏠
Working from home
View GitHub Profile
@brunolm
brunolm / poetrade-autofill.userscript.js
Last active December 14, 2024 00:21
Path of Exile Trade Autofill
// ==UserScript==
// @name Path of Exile Trade Autofill
// @namespace http://tampermonkey.net/
// @version 2024-12-13
// @description Copy and item in-game (CTRL+C) and click the button to process clipboard text
// @author BrunoLM
// @match https://www.pathofexile.com/trade2/search/poe2/Standard
// @icon https://www.google.com/s2/favicons?sz=64&domain=pathofexile.com
// @grant none
// ==/UserScript==
@brunolm
brunolm / sudoku.html
Created December 3, 2024 22:34
Sudoku Solver
<div id="sudoku-solution"></div>
<canvas id="canvas" style="display: none;"></canvas>
<div id="blocks-container"></div>
<script src="https://cdn.jsdelivr.net/npm/tesseract.js@2.1.1/dist/tesseract.min.js"></script>
screenshot:<br />
<textarea>
const canvas = document.querySelector('#game canvas');
// Convert canvas to a Blob
canvas.toBlob(async (blob) => {
@brunolm
brunolm / block-ad-accounts-on-x.userscript.js
Created November 30, 2024 20:09
Block Ad accounts on X (Twitter) | UserScript | Tampermonkey
// ==UserScript==
// @name Block Ad accounts on X (Twitter)
// @namespace http://tampermonkey.net/
// @version 2024-11-30
// @description try to take over the world!
// @author You
// @match https://x.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=x.com
// @grant none
// ==/UserScript==
@brunolm
brunolm / voicecommands.ahk
Created November 11, 2023 01:33
Windows Copilot commanded by voice (Cortana) WIN+F1 to toggle
#Persistent
#SingleInstance, Force
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
SetMouseDelay, -1
; Voice Command state
toggle := false
Menu, Tray, Icon, %A_ScriptDir%\IconFalse.ico
@brunolm
brunolm / .eslintrc
Last active April 7, 2021 21:20
.eslintrc (PascalCase for react)
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
@brunolm
brunolm / base64-image.ps1
Created November 23, 2018 18:22
Powershell: Get-ImageBase64 from FILE or URL
function Get-ImageBase64([string]$file) {
if ($file -like 'http*') {
return Get-ImageBase64FromUrl($file);
}
return Get-ImageBase64FromFile($file);
}
function Get-ImageBase64FromFile(
[string]
@brunolm
brunolm / test.md
Last active November 5, 2020 02:15
aaaaaaa yo

foo bar

@brunolm
brunolm / index.ts
Last active November 6, 2017 10:49
React Redux - Action creator (prototype)
/* Prototype
- Trying to make return type of Creators include the property TYPE
*/
function createActions<T>(obj: T) {
const keys = Object.keys(obj);
return {
Creators: keys.reduce((creators, key) => {
creators[key] = (...args) => ({ type: key, ...obj[key](...args) });
return creators;
@brunolm
brunolm / Header.js
Last active August 13, 2017 21:08
react-native test example with jest
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, Text } from 'react-native';
export default class Header extends Component {
static propTypes = {
user: PropTypes.object,
}
render() {
return (
@brunolm
brunolm / validation-messages.md
Created July 23, 2017 20:42
UX - Field validation messages (en / pt-br)

Validation messages for form inputs

en

The {field} field is required.
The {field} field must contain a valid email address.
The {field} field must contain all valid email addresses.
The {field} field must contain a valid URL.
The {field} field must contain a valid IP.