Skip to content

Instantly share code, notes, and snippets.

@paucoma
paucoma / sub2vcd.py
Created July 28, 2022 18:15
Python Script to convert Flipper RAW .sub file to a Basic VCD Value Change Dump format
#!/usr/bin/env python
# Flipper RAW .sub format
#
# Having a look at some of the code in lib/subghz/protocols/raw.c
# - Decoded data is stored as a line starting with the text "Raw_Data: " followed by space delimited integers.
# - Each line stores a maximum number of integers limited to SUBGHZ_DOWNLOAD_MAX_SIZE ,defined as 512. Then a new line is written.
# - The sign of each integer represents a decoded signal logic level, positive / negative , logic level 1 / 0
# - The absolute value of each integer represents the signal level duration. I am guessing this is in micro-seconds
@jinschoi
jinschoi / bitstream-from-sub.py
Created April 17, 2022 18:00
Python script to clean up and recover an OOK bitstream from a Flipper RAW .sub file.
#!/usr/bin/env python
# Find the raw bitstring from a captured Flipper RAW .sub file.
# Must provide the bitlength in ms, and the allowable error which can be tolerated.
import re
import sys
import math
filename = sys.argv[1]
@jinschoi
jinschoi / create_sub.py
Last active February 24, 2024 06:53
Python script to generate Flipper RAW .sub files from OOK bitstreams
#!/usr/bin/env python3
from typing import Iterable, Union, Any
# freq: frequency in Hz
# zerolen: length of space bit in μs
# onelen: length of mark bit in μs
# repeats: number of times to repeat sequence
# pause: time to wait in μs between sequences
# bits: string of ones and zeros to represent sequence
@thesauri
thesauri / change-mac-address-monterey.md
Created February 22, 2022 15:38
Change MAC address macOS 12 Monterey

Change MAC address in macOS Monterey

I was unable to change the MAC address of the Wi-FI device on a MacBook Air (M1 2020) running macOS Monterey due to the following error: ifconfig: ioctl (SIOCAIFADDR): Can't assign requested addres.

By running the commands in following sequence I was able to change it successfully:

  1. Turn WiFi device off
  2. Turn the WiFi device on again: networksetup -setairportpower en0 on
  3. Change the MAC: ifconfig en0 ether <mac-address-here>
  4. Run: networksetup -detectnewhardware
@yorickdowne
yorickdowne / GethBEHAVE.md
Last active March 13, 2024 01:10
Pruning Geth 1.10.x, 1.11.x, 1.12.x

Note: PBSS in Geth >=1.13.0 removes the need to prune manually.


Old content for reference

Overview

Geth (Go-Ethereum) as of July 2022 takes about 650 GiB of space on a fast/snap sync, and then grows by ~ 14 GiB/week with default cache, ~ 8 GiB/week with more cache.

@matiaslopezd
matiaslopezd / webhook.header.txt
Last active November 9, 2023 22:01
Woocommerce webhook payload and header example
expect 100-continue
content-length 1998
connection close
x-wc-webhook-delivery-id 36e520ebabc2fa725092ff4a47acedf2
x-wc-webhook-id 3
x-wc-webhook-signature 5poyFy4qB6fdvvT5pGbefZmfkpL48uD47F0WYwfmpo4=
x-wc-webhook-event created
x-wc-webhook-resource order
x-wc-webhook-topic order.created
x-wc-webhook-source https://www.website.com/
@stephenwoodford
stephenwoodford / sphinx.rb
Created November 1, 2018 20:05 — forked from korny/sphinx.rb
Sphinx Homebrew formula for MySQL 5.7
class Sphinx < Formula
desc "Full-text search engine"
homepage "http://www.sphinxsearch.com"
url "http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz"
sha256 "6662039f093314f896950519fa781bc87610f926f64b3d349229002f06ac41a9"
head "https://github.com/sphinxsearch/sphinx.git"
bottle do
sha256 "b890cf523db9777c7d125842fd6b0a53fe9a7a5a4cb816389ba6f5ee6483c78d" => :high_sierra
sha256 "55ce34bdedf13946fa614bde50839d93135eae720f1021e2c87807d04515ab18" => :sierra
@soderlind
soderlind / Install.txt
Last active March 5, 2024 20:30
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@decent-dev
decent-dev / slots-testnet-setup-instructions.md
Last active February 21, 2018 16:08
Instructions to setup a local Rinkeby node and run Decent.bet's Slots Testnet

Decent.bet Slots Testnet Instructions

The decent.bet slots runs on the Rinkeby test network. Users are given options to use Infura's mainnet nodes or their local Geth node.

You can access the testnet by visiting the following URL: https://slots-testnet.decent.bet/

If you'd like to use your own local Geth node, follow the instructions below. For Mac OSX, you could follow our tutorial video. Otherwise, skip to the usage instructions

Setting up a local Rinkeby node

@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active April 2, 2024 10:04
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear