Skip to content

Instantly share code, notes, and snippets.

@AlbinoDrought
AlbinoDrought / git-lab.sh
Created August 19, 2025 21:28
Script to open current repo on Gitlab.com. Save as "git-lab" and run as "git lab"
#!/bin/bash
# Get the remote URL and extract the GitLab project path
remote_url=$(git remote get-url origin)
# Convert SSH URL to HTTPS URL
if [[ $remote_url == [email protected]:* ]]; then
# Extract the path after '[email protected]:'
project_path=${remote_url#[email protected]:}
# Remove .git suffix if present
@AlbinoDrought
AlbinoDrought / slitherio_zoom_2025.user.js
Created May 1, 2025 05:23
2025 Zoom Cheat / Zoom Mod Userscript for SlitherIO / Slither.io / Slither.com/io working with Greasemonkey 2, no zoom glitch (sorry for SEO text - I want to be able to find it later)
// ==UserScript==
// @name SlitherIO Zoom 2025
// @description Slither.io working cheat 2025, no zoom glitch, no zoomout glitch, simple code without any obfuscation
// @grant none
// @match *://slither.com/*
// @match *://slither.io/*
// ==/UserScript==
var targetZoom = null;
@AlbinoDrought
AlbinoDrought / wtf.go
Created February 17, 2022 06:49
Why is nil != nil in Go sometimes
package main
import "log"
// some random interface
type User interface {
Name() string
}
// some implementation of that interface
@AlbinoDrought
AlbinoDrought / PAGTR-031-6.md
Last active November 29, 2023 05:13
PAGTR-031-6 ASK OOK Data

PAGTR-031-6

  • 433.99MHz
  • ASK/OOK
  • Baud approx 4860

Messages

Model Channel Button Action Hex
@AlbinoDrought
AlbinoDrought / PAGTR-011.md
Last active January 16, 2022 08:13
PAGTR-011 ASK OOK Data

PAGTR-011

Messages

Model Channel Button Action Hex RawBits DecodedBits
@AlbinoDrought
AlbinoDrought / README.md
Created August 13, 2021 00:09
Working around `bufio.ErrTooLong`: "bufio.Scanner: token too long" with and without Logrus

You can avoid a bufio.ErrTooLong error ("bufio.Scanner: token too long") by using something like this as your scanner.Split() function:

const maxTokenLength = bufio.MaxScanTokenSize / 2

func scanLinesOrGiveLong(data []byte, atEOF bool) (advance int, token []byte, err error) {
	advance, token, err = bufio.ScanLines(data, atEOF)
	if advance > 0 || token != nil || err != nil {
		// bufio.ScanLines found something, use it
 return
@AlbinoDrought
AlbinoDrought / index.js
Created February 17, 2021 17:20
Persistent cachios + lru-cache usage for https://github.com/AlbinoDrought/cachios/issues/59
const axios = require('axios');
const cachios = require('cachios');
const LRU = require('lru-cache');
const fs = require('fs');
//// this part is for debugging purposes:
// build an axios client that logs outbound requests
const axiosClient = axios.create();
>>> \Carbon\Carbon::parse('2020-12-31T00:00:00Z')->subMonth()->toIso8601String()
=> "2020-12-01T00:00:00+00:00"
@AlbinoDrought
AlbinoDrought / issue.md
Created November 20, 2020 23:32
Laravel Nova Custom Tool / Card / Dashboard unknown plugin error babel

Laravel Nova Custom Tool / Card / Dashboard Unknown Plugin Error

Saving this solution for later, might be able to google it next time it happens

Error:

Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "base" at 0, attempted to resolve relative to "/nova-components/unified-transaction-api/dist"
    at /nova-components/NovaStuff/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (<anonymous>)
@AlbinoDrought
AlbinoDrought / expressions
Created November 4, 2020 05:31
Dirty conversion of protobuf_config.py from https://github.com/mildsunrise/protobuf-inspector to .proto
Replace
"([^"]+)": ?\{
With
message $1 {
Replace
},
With
}