Skip to content

Instantly share code, notes, and snippets.

@jimilinuxguy
jimilinuxguy / filter_signal.py
Created December 27, 2022 14:36 — forked from Semnodime/filter_signal.py
Script to preprocess IQ-signals in-place: Remove noise and combine nearby signal parts into one.
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
description = """Script to preprocess IQ-signals in-place: Remove noise and combine nearby signal parts into one."""
def list_strong_signal_indices(signal, threshold: int):
"""
Return a list of all indices where the magnitude of the I-part is not smaller than the threshold.
@jimilinuxguy
jimilinuxguy / create_sub.py
Created April 29, 2022 12:45 — forked from jinschoi/create_sub.py
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
@jimilinuxguy
jimilinuxguy / Pause
Created April 24, 2022 23:28
Flipper zero TouchTunes remote
This is the pause button for the TouchTunes remote pin code 000
Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 433920000
Preset: FuriHalSubGhzPresetOok650Async
Protocol: RAW
RAW_Data: -32700 4189 -17428 133 -198 265 -502 197 -396 331 -1128 163 -100 131 -200 465 -132 231 -100 5603 -16822 231 -130 129 -132 461 -132 261 -496 131 -230 2237 -17258 129 -1654 197 -196 97 -594 433 -98 231 -98 261 -100 295 -232 10153 -132 9529 -98 3805 -98 15423 -17530 99 -892 97 -132 131 -366 233 -166 821 -17018 527 -100 263 -100 99 -860 561 -100 667 -132 563 -168 21305 -18352 231 -100 895 -100 6105 -132 1129 -134 1589 -20496 397 -166 431 -132 165 -134 431 -98 4671 -132 2271 -18816 297 -132 329 -100 1931 -100 527 -132 99 -100 5697 -98 8491 -18766 329 -166 265 -268 231 -166 99 -232 199 -100 3645 -100 31369 -98 3691 -98 1117 -130 4647 -17930 131 -2952 399 -166 995 -100 5791 -17326 199 -1026 331 -132 363 -366 463 -17062 99 -1822 131 -132 131 -200 165 -132 303 -19506 99 -198 263 -200 195 -164 131 -98 527 -496 297 -134 99 -166 9
@jimilinuxguy
jimilinuxguy / bitstream-from-sub.py
Created April 18, 2022 20:23 — forked from jinschoi/bitstream-from-sub.py
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]
@jimilinuxguy
jimilinuxguy / proxy.pac
Created September 5, 2019 06:22 — forked from swinton/proxy.pac
Example proxy.pac, using a SOCKS proxy for certain hosts.
function FindProxyForURL(url, host) {
var useSocks = ["imgur.com"];
for (var i= 0; i < useSocks.length; i++) {
if (shExpMatch(host, useSocks[i])) {
return "SOCKS localhost:9999";
}
}
return "DIRECT";
- name: ec2-instances-with-ami
resource: ec2
mode:
type: config-rule
role: lambda-role
filters:
- "State.Name": running
- type: image
key: OwnerId
op: not-equal