Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
@howiemnet
howiemnet / Houdini-->Fusion animation exporter thingy.py
Last active January 14, 2024 20:48
Early version of Houdini to Fusion animation exporter
################################################################
#
# h's hacky Houdini --> Fusion camera animation exporter
#
# Last mod: 20/3/2020 / [email protected]
#
#
#
#
# Notes:
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@ranjanprj
ranjanprj / PG_EXTN_C_WITH_RUST.md
Last active November 9, 2019 18:10
PostgreSQL Extension in C with Rustlang

Just a small gist to show how you can easily create a Rust shared lib, wrap it with C and call it from PostgreSQL SQL Command.

  1. Prereq : Tested on Ubuntu 18, GCC, postgresql-server-11, postgresql-dev-11, rustlang
  2. Create new project Cargo embed and cd embed
  3. Rename the file src/main.rs to lib.rs
  4. Add following code
#[no_mangle]
pub extern fn double_input(input: i32) -> i32 {
    input * 2

Results of Skia's nanobench for each of available configs.

The RPi4 board was using default clocks and was provided adequate power and cooling. The tests were conducted on fully-updated Raspbian Buster.

Skia was built with https://github.com/google/skia/commit/1e03b6b10e89fc54f379df4b2d705b1c64e2e0d6

I'd love to test with RPi3B and RPi3B+ that I have, but my charger and PSU seem to be too weak, as both boards report "under voltage" condition.

--------------------------- MODULE MemoryTracking ---------------------------
(* A memory allocator which tracks usage by "phase" *)
CONSTANTS Phase, (* A set of phases *)
Thread, (* A set of threads *)
Address (* A set of addresses *)
VARIABLES memory, (* All in-use allocations *)
memoryByPhase, (* A mapping from phases to sets of allocated items *)
memoryByThread (* A mapping from threads to an allocated record *)
@atereshkov
atereshkov / podspec-example
Last active April 29, 2023 16:11
Xcode 10 Fat framework - How to create universal binary iOS framework (+ Cocoapods podspec)
If you've got something like this:
file was built for arm64 which is not the architecture being linked (x86_64):
Than this gist is for you.
Let's say you have already developed the framework itself and just want to build the binary
and distribute it through the Cocoapods.
1. Make sure your framework "Deployment Target" is equal to all the dependencies from your podspec file.
@howiemnet
howiemnet / Particle resizer.vex.cpp
Last active July 11, 2022 18:04
Houdini Particle distance resizer
// NOTE: ignore the .cpp extension on the filename - this is VEX
// but I couldn't find a gist-friendly way to syntax-hilight it
// ¯\_(ツ)_/¯
//
// h's magic adaptive point resizer for optimal
// rendering of tiny points/particles/wires
//
// 1/2/2018 [email protected]
// CC-0 - use and abuse
@florentchauveau
florentchauveau / leaky_bucket.lua
Created August 28, 2018 12:50
Redis script (Lua) to implement a leaky bucket
-- Redis script to implement a leaky bucket
-- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260
-- (c) Florent CHAUVEAU <[email protected]>
local ts = tonumber(ARGV[1])
local cps = tonumber(ARGV[2])
local key = KEYS[1]
-- remove tokens < min (older than now() -1s)
local min = ts -1
-- Redis script to get the size of a token bucket
-- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260
-- (c) Florent CHAUVEAU <[email protected]>
local ts = tonumber(ARGV[1])
local key = KEYS[1]
-- remove tokens < min (older than now() -1s)
local min = ts -1
@florentchauveau
florentchauveau / bucket_add.lua
Created August 28, 2018 11:56
Redis script (Lua) to add an event to a token bucket
-- Redis script to add an event to a token bucket
-- see https://medium.com/callr-techblog/rate-limiting-for-distributed-systems-with-redis-and-lua-eeea745cb260
-- (c) Florent CHAUVEAU <[email protected]>
local ts = tonumber(ARGV[1])
-- set the token bucket to 1 second (rolling)
local min = ts -1
-- iterate overs keys