This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ghidra.program.model.address import Address | |
from ghidra.program.model.mem import MemoryAccessException | |
from ghidra.program.flatapi import FlatProgramAPI | |
from ghidra.util.task import TaskMonitor | |
import math | |
import json | |
from os.path import isfile, join, dirname | |
import struct as st | |
import string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SAMPLE_OFFSET 188 | |
#define NSAMPLES 68 | |
#define TRACES_TO_CAPTURE 200 | |
#define FOB_PIN 5 | |
#define BUTTON_PIN 8 | |
#define TRIGGER_PIN 9 | |
unsigned int timeDiffs[NSAMPLES]; // the diffs (us) between all the codeword pulses received | |
unsigned char bits[NSAMPLES - 1]; // timeDiffs converted into bits according to the VPWM modulation in the datasheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: SkipManager | |
#define NUM_SKIP_BYTES 10 | |
#define BYTES_PER_LINE 34 | |
#define SKIP_FILE_PATH "/Users/samlerner/Documents/Spotify/skipped.csv" | |
// SkipManager class to handle writing skips to files | |
class SkipManager { | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Partial library I wrote a while ago that is a wrapper for spotipy. | |
# I'm not particularly proud of the code so I only posted what's needed to understand | |
# my get_recents.py gist | |
import os | |
import spotipy.util as util | |
base_url = 'https://api.spotify.com/v1/' | |
auth_header = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run as a local cron job, edit your crontab like so: | |
# | |
# SPOTIPY_USER_ID=<redacted> | |
# SPOTIPY_CLIENT_ID=<redacted> | |
# SPOTIPY_CLIENT_SECRET=<redacted> | |
# script_path=<redacted> | |
# SPPATH=$script_path | |
# python_path=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 | |
# | |
# PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin |