Skip to content

Instantly share code, notes, and snippets.

Avatar
🇨🇦
Use AGPL

Sean AlbinoDrought

🇨🇦
Use AGPL
View GitHub Profile
@AlbinoDrought
AlbinoDrought / creamy-things-to-make.md
Last active Mar 22, 2022
Creamy Things To Make ™️
View creamy-things-to-make.md

Creamy Things

  • SkipTheDishes tracker (No longer used)
  • 🎊 Some ghetto NextCloud clone that I feel safe selfhosting (probably read only) (video version here, working and in use) (file version WIP)
  • yet another IRC client for the 21st century
  • selfhosted screensharing thing (like rabb.it, but not) alternative exists: https://github.com/m1k1o/neko
  • a modern browser that isn't rounded
  • some way to import normal cams to unify Unifi Video is losing support, moving to something like Shinobi instead (ctrl-f NVR)
  • foss modern feedback tracker thing (can io)
  • visual dice rolling bot to make hard life choices for me
@AlbinoDrought
AlbinoDrought / wtf.go
Created Feb 17, 2022
Why is nil != nil in Go sometimes
View wtf.go
package main
import "log"
// some random interface
type User interface {
Name() string
}
// some implementation of that interface
@AlbinoDrought
AlbinoDrought / PAGTR-011.md
Last active Jan 16, 2022
PAGTR-011 ASK OOK Data
View PAGTR-011.md

PAGTR-011

Messages

Model Channel Button Action Hex RawBits DecodedBits
@AlbinoDrought
AlbinoDrought / PAGTR-031-6.md
Last active Jan 15, 2022
PAGTR-031-6 ASK OOK Data
View PAGTR-031-6.md

PAGTR-031-6

  • 433.0MHz
  • ASK/OOK
  • Baud approx 5100

Messages

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

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
View index.js
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();
View nice.txt
>>> \Carbon\Carbon::parse('2020-12-31T00:00:00Z')->subMonth()->toIso8601String()
=> "2020-12-01T00:00:00+00:00"
@AlbinoDrought
AlbinoDrought / issue.md
Created Nov 20, 2020
Laravel Nova Custom Tool / Card / Dashboard unknown plugin error babel
View issue.md

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 ()
@AlbinoDrought
AlbinoDrought / expressions
Created Nov 4, 2020
Dirty conversion of protobuf_config.py from https://github.com/mildsunrise/protobuf-inspector to .proto
View expressions
Replace
"([^"]+)": ?\{
With
message $1 {
Replace
},
With
}
@AlbinoDrought
AlbinoDrought / gitBash_windows.md
Created Jul 6, 2020 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make
View gitBash_windows.md

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so