Skip to content

Instantly share code, notes, and snippets.

@talss89
talss89 / twai_filter.c
Created September 7, 2023 22:39
ESP-IDF TWAI - Create filter mask
/*
* This function accepts a <min> and <max> CAN ID, and generates a single TWAI acceptance mask that is a
* loose fit for CAN packets with IDs between <min> and <max>.
*
* This may not filter out all other packets, and is imperfect. But a quick solution for a filter range.
*/
void twai_generate_filter(uint16_t min, uint16_t max, twai_filter_config_t* filter) {
uint32_t mask[2] = {~0, ~0};
@talss89
talss89 / ExtractedHook.php
Last active May 1, 2023 14:00
[Now https://github.com/conduit-innovation/gorilla-claw] WordPress object method hooks - find, remove, replace: Find hook by class name and method, Replace hook and reference original object
<?php
/**
** This Gist developed into a full runtime toolkit for hooks. See https://github.com/conduit-innovation/gorilla-claw **
This is a utility to remove or replace WordPress actions or filters, when the handler is an object method.
Can be useful changing Woocommerce block functionality, amongst other things.
@talss89
talss89 / node-increase-file-watcher-count.yaml
Created February 9, 2023 13:02
Kubernetes - Increase file-watcher max-count on every node (for VSCode)
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-setup
namespace: kube-system
labels:
k8s-app: node-setup
spec:
selector:
matchLabels:
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
kerberos.cc
worker.cc
security_credentials.cc
security_buffer.cc
C:\Users\Tom\.nw-gyp\0.8.4\deps\v8\include\v8.h(261): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\Tom\Documents\Jobs\ada\src\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
{
"index": {
"analysis": {
"analyzer": {
"custom_analyzer": {
"type": "custom",
"tokenizer": "nGram",
"filter": ["stopwords", "asciifolding", "lowercase", "snowball", "elision", "worddelimiter"]
},
"custom_search_analyzer": {