Skip to content

Instantly share code, notes, and snippets.

@gilankpam
gilankpam / convert.py
Created June 15, 2023 19:03
yolov8 rk3588
from rknn.api import RKNN
ONNX_MODEL = 'yolov8m.onnx'
RKNN_MODEL = 'yolov8m.rknn'
DATASET = './dataset.txt'
QUANTIZE_ON = True
if __name__ == '__main__':
# Create RKNN object
@crazygit
crazygit / parseTransaction.go
Last active April 25, 2024 00:49
Parse Ethereum Transaction, Decode input data, Decode output data
package main
import (
"context"
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
@Mathews2115
Mathews2115 / auto-dash.md
Last active April 25, 2024 00:47
Automotive dashboard / Gauge cluster on a Raspberry Pi 3 using chomium and node.js

Quick How-To Raspberry Pi 3 Dashboard setup.

This is outdated - refer to this for more updated instructions

WHAT THIS DOESN'T HAVE

  • Code that listens and parses CAN messages. (Though I do use this and it is amazing)

Quick Hardware Review

  • Gauge Cluter/Dashboard
  • A raspberry pi will listen for CANBUS messages and whatever program you use (or make) will reactive to those messages.
@MarceloCajueiro
MarceloCajueiro / script.rb
Created July 17, 2018 11:50
Move sidekiq jobs from one queue to another
queue = Sidekiq::Queue.new("default")
queue.each do |job|
if job.klass == "DailyFrequencyCreatorWorker"
DailyFrequencyCreatorWorker.set(queue: 'daily_frequency_creator').perform_async(*job.args)
job.delete
end
end;nil
@wpsmith
wpsmith / font-mimetypes
Last active April 25, 2024 00:44 — forked from localpcguy/font-mimetypes
Mime Types for .htaccess or web.config
.eot - application/vnd.ms-fontobject
.woff - application/font-woff
.ttf - application/x-font-truetype
.svg - image/svg+xml
.otf - application/x-font-opentype
IIS (Web.Config)
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<remove fileExtension=".ttf" />
@prestia
prestia / Configuring Raspberry Pi 3 B+ to Run Pi-Hole and Use DNS over HTTPS.md
Last active April 25, 2024 00:43
Configuring Raspberry Pi 3 B+ to Run Pi-Hole and Use DNS over HTTPS

Configure the Raspberry Pi

Install Raspbian Lite

  • Download Raspbian Lite
  • Download and install balenaEtcher
  • Flash the Raspbian Lite .img or .zip to an SD card using balenaEtcher

Optimize & configure the Raspberry Pi

  • Turn on the Raspberry Pi and wait for it to boot to the CLI
  • Enter sudo raspi-config
    • Select 1 Change User Password and create a unique password
  • Optional: Select 2 Network Options > N1 Hostname
@nooges
nooges / Zen and the Art of IT Backup.md
Last active April 25, 2024 00:41
Zen and the Art of IT Backup

Zen and the Art of IT Backup

Principle 1 - Scope

Excited, the new apprentice jumped right into his Master’s training server.

The apprentice asked, “Master what files should I backup?”

The Master replied, “Does not the mother bird care for all her fledglings? Will not the shepherd watch over his entire flock? Therefore, one must backup all files in one’s care, no matter how small or insignificant we consider them to be. Each file has its importance and must not be overlooked.”

@munrocket
munrocket / wgsl_noise.md
Last active April 25, 2024 00:32
WGSL Noise Algorithms

WGSL Noise Algorithms

Operator % has changed, probably current code with it need a fix

Good and fast integer hash

// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
    var h = n * 747796405u + 2891336453u;
    h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;
@yoannmoinet
yoannmoinet / icons.sh
Last active April 25, 2024 00:30
Mac OS X icon.icns
#!/bin/sh
#Usage: ./icons.sh ../assets/media/icon_color_1024.png ../assets/icons
name=$(basename "$1" ".png")
dir=$(cd "$(dirname "$2")"; pwd)/$(basename "$2")
mkdir $dir/$name.iconset
sips -Z 16 --out $dir/$name.iconset/icon_16x16.png $1
sips -Z 32 --out $dir/$name.iconset/icon_16x16@2x.png $1
sips -Z 32 --out $dir/$name.iconset/icon_32x32.png $1
@bradtraversy
bradtraversy / myscript.sh
Last active April 25, 2024 00:29
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"