Skip to content

Instantly share code, notes, and snippets.

View versionsix's full-sized avatar
🦖
Using modern software.

Frank Meeusen versionsix

🦖
Using modern software.
  • Belgium, Antwerp
View GitHub Profile
@versionsix
versionsix / convert.py
Created December 21, 2023 21:06
PM3 <> flipper RfidRecord
from flipper_raw_rfid.rifl import Rifl
from flipper_raw_rfid.utils import batched, pad_to_signal, signal_to_pad, autocorrelate, smooth, binarize, find_first_transition_index, find_peaks, histogram, smooth, binarize
from flipper_raw_rfid.bits import decode_lengths, decode_manchester, decode_em_4100, to_str
from matplotlib import pyplot as plt
from scipy import signal as scipy_signal
import numpy as np
import numpy
import sys
rifl = Rifl.load('Red354b.ask.raw')
@versionsix
versionsix / main.go
Created June 23, 2022 12:52
go serverside events curl
package main
import (
"log"
"net/http"
"strconv"
"time"
"gopkg.in/antage/eventsource.v1"
)
@versionsix
versionsix / _terraform_sdkv2.md
Created May 24, 2022 12:59
[FullDOC] Terraform SDKv2 provider development

01-index


page_title: 'Home - Plugin Development: SDKv2' description: Learn about version 2 of the Terraform Plugin SDK.

Terraform Plugin SDKv2

@versionsix
versionsix / _assert.md
Created May 11, 2022 11:24
[DOC] stretchr/testify/assert

assert

import "github.com/stretchr/testify/assert"

Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.

@versionsix
versionsix / _gorm_doc.md
Last active May 11, 2022 11:13
[FullDOC] gorm.io

advanced_query


title: Advanced Query layout: page

Smart Select Fields

@versionsix
versionsix / main.go
Created May 3, 2022 05:47
Golang parse json with invalid "string-int" types
package main
import (
"encoding/json"
"fmt"
"reflect"
"strconv"
)
type invalidStrNums []int
@versionsix
versionsix / Makefile
Created January 27, 2022 04:23
pcie naming root devices and such, dump
# Just completions
# just --completions zsh | sudo tee /usr/local/share/zsh/site-functions/_just
# zinit creinstall -q /usr/local/share/zsh/site-functions/
export http_proxy := "http://172.31.100.7:3128/"
# https://uk.lxd.images.canonical.com/images/
# https://cloud-images.ubuntu.com/impish/current/
# 537M Ubuntu Server Cloud Image Builds
@versionsix
versionsix / README.md
Created November 19, 2021 19:58 — forked from zerok/README.md
OmniGraffle: Export layers on top of base-layer as PNG

Layer export for OmniGraffle

If you have a Graffle document (doc.graffle) with a canvas named "mycanvas" holding the following layers ...

  • Extra 3
  • Extra 2
  • Extra 1
  • Base

... then these images will be generated:

@versionsix
versionsix / gcp-iam-restrict-user-bucket.sh
Created November 13, 2021 14:04 — forked from pydevops/gcp-iam-restrict-user-bucket.sh
Google Cloud Platform example to add IAM role restricting user to specific storage buckets with conditions
#!/usr/bin/env bash
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_USER=$(gcloud config get-value core/account) # set current user
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)")
export IDNS=${PROJECT_ID}.svc.id.goog # workload identity domain
export GCP_REGION="us-central1"
export GCP_ZONE="us-central1-a"
@versionsix
versionsix / vpn
Created October 4, 2021 08:36 — forked from alyssais/vpn
A tiny command line interface to Viscosity
#!/usr/bin/env bash
run_list() {
osascript <<OSA
tell application "Viscosity"
repeat with theConnection in connections
set theName to name of theConnection
set theState to state of theConnection
log theName & ": " & theState
end repeat