Skip to content

Instantly share code, notes, and snippets.

View Marcus10110's full-sized avatar

Mark Marcus10110

View GitHub Profile
@Marcus10110
Marcus10110 / saleae_cal_editor.py
Created September 7, 2022 23:07
Saleae Logic 2 Calibration Editor
from os import path
import shutil
import json
import argparse
import pathlib
# Usage:
# first locate the calibration file for your device. Calibration files are stored here: C:\Users\<your user folder>\AppData\Roaming\Logic\calibrations
# the first part of the file name is the base 10 version of the device ID.
# If there is more than 1 .cal file, you can copy the hex device ID shown in the device information dialog into a hex to decimal converter online, to locate the correct cal file.
@Marcus10110
Marcus10110 / ts_init.sh
Last active November 13, 2021 23:41
Quick setup for a Nodejs TS project
npm init -y
yarn add --dev typescript ts-node nodemon @types/node
npx tsc --init --outDir Dist
touch index.ts
npx npm-add-script -k dev -v "nodemon index.ts"
npx npm-add-script -k start -v "ts-node index.ts"
mkdir .vscode
echo '{ "editor.formatOnSave": true }' > .vscode\settings.json
@Marcus10110
Marcus10110 / extension.json
Last active March 10, 2020 18:35
Mark's first Saleae High Level Analyzers
{
"version": "0.0.1",
"apiVersion": "1.0.0",
"author": "Mark \"cool guy\" Garrison",
"name": "Marks Utilities",
"extensions": {
"Fancy I2C": {
"type": "HighLevelAnalyzer",
"entryPoint": "util.I2cHla"
},
@Marcus10110
Marcus10110 / analyzer_export.py
Created May 4, 2017 22:39
Saleae python capture and analyzer export example
import saleae
#add this function to saleae.py:
# def capture_blocking(self):
# '''Start a new capture and immediately return.'''
# try:
# self._cmd('CAPTURE', True)
# return True
# except self.CommandNAKedError:
# return False
@Marcus10110
Marcus10110 / DSCOVR.linq
Last active October 21, 2015 21:33
Linqpad Script to scrape every DSCOVR photo of earth
<Query Kind="Program">
<Reference>&lt;ProgramFilesX86&gt;\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\System.Web.Helpers.dll</Reference>
<Namespace>System.Net</Namespace>
<Namespace>System.Threading</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
<Namespace>System.Web.Helpers</Namespace>
</Query>
//Requires the following additional namespace imports:
//System.Net