My little pretties!
AgileVR DFU Tool
Here's a little tool I wrote in C# for uploading firmware to the nRF52832 SoC on Windows.
Transfer of an init packet
Transfer of a firmware image
SEGGER Embedded Studio
It's fun writing firmware using SES!
SEGGER Debugger!
Check out my SEGGER debugger setup!
List Forks on Github
Here's a Python script using the Github API. I wanted to include the date and last commit message. You'll need to include a Personal Access Token (PAT) if you need a bump to 5k requests/hr.
USAGE: python3 list-forks.py https://github.com/itinance/react-native-fs
Example Output:
https://github.com/itinance/react-native-fs root 2021-11-04 "Merge pull request #1016 from mjgallag/make-react-native-windows-peer-dependency-optional make react-native-windows peer dependency optional"
https://github.com/AnimoApps/react-native-fs diverged +2 -160 [+1m 10d] "Improved comments to align with new PNG support in copyAssetsFileIOS"
https://github.com/twinedo/react-native-fs ahead +1 [+26d] "clear warn yellow new NativeEventEmitter()"
https://github.com/synonymdev/react-native-fs ahead +2 [+23d] "Merge pull request #1 from synonymdev/event-emitter-fix Event Emitter Fix"
https://github.com/kongyes/react-native-fs ahead +2 [+10d] "aa"
https://github.com/kamiky/react-native-fs diverged +1 -2 [-6d] "add copyCurrentAssetsVideoIOS function to retrieve current modified videos"
https://github.com/nikola166/react-native-fs diverged +1 -2 [-7d] "version"
https://github.com/morph3ux/react-native-fs diverged +1 -4 [-30d] "Update package.json"
https://github.com/broganm/react-native-fs diverged +2 -4 [-1m 7d] "Update RNFSManager.m"
https://github.com/k1mmm/react-native-fs diverged +1 -4 [-1m 14d] "Invalidate upload session Prevent memory leaks"
https://github.com/TickKleiner/react-native-fs diverged +1 -4 [-1m 24d] "addListener and removeListeners methods wass added to pass warning"
https://github.com/nerdyfactory/react-native-fs diverged +1 -8 [-2m 14d] "fix: applying change from https://github.com/itinance/react-native-fs/pull/944"
import requests, re, os, sys, time, json, datetime
from dateutil.relativedelta import relativedelta
from urllib.parse import urlparse
GITHUB_PAT = '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'
def json_from_url(url):
response = requests.get(url, headers={ 'Authorization': 'token {}'.format(GITHUB_PAT) })
return response.json()
def date_delta_to_text(date1, date2):
ret = []
date_delta = relativedelta(date2, date1)
sign = '+' if date1 < date2 else '-'
if date_delta.years != 0:
ret.append('{}y'.format(abs(date_delta.years)))
if date_delta.months != 0:
ret.append('{}m'.format(abs(date_delta.months)))
if date_delta.days != 0:
ret.append('{}d'.format(abs(date_delta.days)))
return '{}{}'.format(sign, ' '.join(ret))
def iso8601_date_to_date(date):
return datetime.datetime.strptime(date, '%Y-%m-%dT%H:%M:%SZ')
def date_to_text(date):
return date.strftime('%Y-%m-%d')
def process_repo(repo_author, repo_name, fork_of_fork):
page = 1
while 1:
forks_url = 'https://api.github.com/repos/{}/{}/forks?per_page=100&page={}'.format(repo_author, repo_name, page)
forks_json = json_from_url(forks_url)
if not forks_json:
break
for fork_info in forks_json:
fork_author = fork_info['owner']['login']
fork_name = fork_info['name']
forks_count = fork_info['forks_count']
fork_url = 'https://github.com/{}/{}'.format(fork_author, fork_name)
compare_url = 'https://api.github.com/repos/{}/{}/compare/master...{}:master'.format(repo_author, fork_name, fork_author)
compare_json = json_from_url(compare_url)
if 'status' in compare_json:
items = []
status = compare_json['status']
ahead_by = compare_json['ahead_by']
behind_by = compare_json['behind_by']
total_commits = compare_json['total_commits']
commits = compare_json['commits']
if fork_of_fork:
items.append(' ')
items.append(fork_url)
items.append(status)
if ahead_by != 0:
items.append('+{}'.format(ahead_by))
if behind_by != 0:
items.append('-{}'.format(behind_by))
if total_commits > 0:
last_commit = commits[total_commits-1];
commit = last_commit['commit']
author = commit['author']
date = iso8601_date_to_date(author['date'])
items.append('[{}]'.format(date_delta_to_text(root_date, date)))
items.append('"{}"'.format(commit['message'].replace('\n', ' ')))
if ahead_by > 0:
print(' '.join(items))
if forks_count > 0:
process_repo(fork_author, fork_name, True)
page += 1
url_parsed = urlparse(sys.argv[1].strip())
path_array = url_parsed.path.split('/')
root_author = path_array[1]
root_name = path_array[2]
root_url = 'https://github.com/{}/{}'.format(root_author, root_name)
commits_url = 'https://api.github.com/repos/{}/{}/commits/master'.format(root_author, root_name)
commits_json = json_from_url(commits_url)
commit = commits_json['commit']
author = commit['author']
root_date = iso8601_date_to_date(author['date'])
print('{} root {} "{}"'.format(root_url, date_to_text(root_date), commit['message'].replace('\n', ' ')));
process_repo(root_author, root_name, False)
AgilePhysio App
Here are some screenshots of the AgilePhysio app we're working on for Mechatech. It's written using React Native with a PostgreSQL database and a NodeJS back-end. It supports both Android and iOS.
Mobile Dev
Cross platform Bluetooth LE mobile dev using React Native!
PostgreSQL Database Design
Who says database design isn't fun?
patchram
Broadcom PatchRAM DFU (Device Firmware Upgrade) utility for macOS.
Based on original dfu-tool & dfu-programmer for Linux and BrcmPatchRAM for macOS.
Supports the Intel HEX dfu file format (including zlib compressed).
NOTE: You will need to disable your bluetooth device for this tool to be able to access it.
Usage
patchram <vendorId hex> <productId hex> <firmware.dfu>
Example
./patchram 0x0a5c 0x216f ./BCM20702A1_001.002.014.1443.1572_v5668.zhx
This uses the USB DFU specification (http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf), to upload firmware into a DFU device.
Credits
- headkaze for writing the software, updating and maintaining it
- RehabMan for BrcmPatchRAM
- the-darkvoid for dfu-util-osx and BrcmPatchRAM
Source
Flashing firmware is dangerous and could render your device non-functional. Use this at your own risk!
Z88DK Demos
We've released a series of z88dk demo's for the ZX Spectrum Next. These are designed to complement Stefan Bylund's great series of examples.
Chess Demo
Demonstrates relative sprites for the ZX Spectrum Next.
https://www.baker76.com/zxnext-chess/
Tilemap Demo
Tilemap demo for the ZX Spectrum Next.
https://www.baker76.com/zxnext-tilemap/
Layer2 Tilemap Demo
Example using Layer2 tilemap rendering for the ZX Spectrum Next.
https://www.baker76.com/zxnext-layer2-tilemap/
SFX Demo
Sound effects demo for the ZX Spectrum Next.
https://www.baker76.com/zxnext-sfx/
Dual VT Sound Demo
Example showing dual Vortex Tracker II player for the ZX Spectrum Next.
https://www.baker76.com/zxnext-dual-vt-sound/
DMA Sample Demo
Based on David Saphier (em00k's) Multi Sample Engine in z80 for the ZX Spectrum Next.
https://www.baker76.com/zxnext-dma-sample/