Skip to content

Instantly share code, notes, and snippets.

View TaylorHo's full-sized avatar
👻
Everything is Open Source if you can rever engineer it.

Taylor Hoffmann TaylorHo

👻
Everything is Open Source if you can rever engineer it.
View GitHub Profile
@TaylorHo
TaylorHo / filter.txt
Created September 19, 2024 00:30
AdGuard DNS SupportXMR allow filter
@@||supportxmr.com^
@@||pool.supportxmr.com^
@TaylorHo
TaylorHo / file-to-string-base64-compression.js
Created April 23, 2024 12:20
Compressão de String base64 utilizando NodeJS
import { gzipSync } from 'node:zlib';
import { readFile } from 'node:fs/promises';
const fileToCompress = 'package-lock.json'; // Example file. If you're using an HTTP server the file can be Posted into the body.
(async () => {
const file = await readFile(fileToCompress);
console.log(file.toString('base64').length);
const zipped = gzipSync(file);
@TaylorHo
TaylorHo / speed.js
Created March 19, 2024 01:02
Speeeed
(()=>{let e=0;const t=document.querySelector("#startStopBtn");let n=setInterval((()=>{if(!t.classList.contains("running")){let o=document.querySelector("#dlText")?.innerText,s=document.querySelector("#ulText")?.innerText,c=document.querySelector("#pingText")?.innerText;if(o&&s){const e=new Date,t=`${e.getHours()<10?"0"+e.getHours():e.getHours()}h${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()} aos ${e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds()}s`;console.log(`${t} - Download: ${o} Mbps | Upload: ${s} Mbps | Ping: ${c} ms`)}t.click(),e<100?e++:clearInterval(n)}}),100)})();
@TaylorHo
TaylorHo / vercel.json
Created February 28, 2024 01:15
Arquivo de configuração da Vercel com cabeçalhos de segurança
{
"headers": [
{
"source": "/(.*)",
"headers" : [
{
"key" : "Cache-Control",
"value" : "public, max-age=31536000, immutable"
},
{
@TaylorHo
TaylorHo / Dockerfile
Created February 25, 2024 00:32
Caddy with Coraza WAF
FROM golang:1.22.0-alpine3.19@sha256:3325c5593767d8f1fd580e224707ca5e847a1679470a027aaa3c71711ce16613 AS builder
WORKDIR /build
RUN apk add --update --no-cache git
RUN printf "package main\nimport (\ncaddycmd \"github.com/caddyserver/caddy/v2/cmd\"\n_ \"github.com/caddyserver/caddy/v2/modules/standard\"\n_ \"github.com/corazawaf/coraza-caddy/v2\"\n)\nfunc main() {\ncaddycmd.Main()\n}" > main.go
RUN go mod init caddy
RUN go get github.com/caddyserver/caddy/v2@v2.7.6
RUN go get github.com/corazawaf/coraza-caddy/v2@v2.0.0-rc.3
RUN go get
@TaylorHo
TaylorHo / Hotay-CLA.md
Created December 15, 2023 02:00
Hotay Software Development Contributor License Agreement (CLA)

Hotay's Contributor License Agreement

Thank you for your interest in the open source project(s) managed by Hotay Software Development LTDA (“Hotay”). In order to clarify the intellectual property license granted with Contributions from any person or entity, Hotay must have a Contributor License Agreement (“CLA”) on file that has been signed by each contributor, indicating agreement to the license terms below. This license is for your protection as a contributor as well as the protection of Hotay and its other contributors and users; it does not change your rights to use your own Contributions for any other purpose.

By clicking “Accept” on this page You accept and agree to these terms and conditions for Your past, present and future Contributions submitted to Hotay open source project(s). In return, Hotay shall consider Your Contributions for addition to the official Hotay open source project(s) for which they were submitted. Except for the license granted herein to Hotay and recipients of software distrib