Skip to content

Instantly share code, notes, and snippets.

View swiftgeek's full-sized avatar

Swift Geek (Sebastian Grzywna) swiftgeek

View GitHub Profile
@swiftgeek
swiftgeek / watchdog-test.ino
Created April 21, 2023 02:49
For optiboot report
// ATmega328P watchdog test sketch
#include <avr/wdt.h>
int inByte = 0;
int led = 13;
void setup() {
wdt_disable();
Serial.begin(115200);
Serial.print("ATmega328P watchdog test sketch\r\n");
pinMode(led, OUTPUT);
@swiftgeek
swiftgeek / mec_csum_outer.c
Created September 6, 2020 11:32
patched for 8bit sum - T20 and older
/*
* mec_csum_outer.c: check/fix outer checksum
* Should be run on the encrypted image
*/
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include "mmapfile.h"
int main(int argc, char *argv[])
@swiftgeek
swiftgeek / iButtonRW.ino
Last active November 1, 2023 04:18
RW1990 programmer, with arduino
// Based on https://danman.eu/blog/cloning-ibutton-using-rw1990-and-avr/
// and: http://elimelecsarduinoprojects.blogspot.com/2013/06/read-dallas-ibutton-arduino.html
// By Swift Geek 28-08-2015
// TODO: danger to atmega328! Use OpenCollector logic!
// Used 4.8kΩ Pull-up and 3.1 Vcc for arduino/pull-up
#include <OneWire.h>
OneWire ibutton (8); // I button connected on PIN 2.
@swiftgeek
swiftgeek / cpan_rss.sh
Created May 8, 2015 03:27
cpan rss generation for archlinux aur packages (upstream cpan repo rss)
#!/bin/bash
packages=( `curl -s "https://aur.archlinux.org/packages/?SeB=m&K=swiftgeek" | tr \" "\n" | grep '^/packages/' | grep perl | awk -F/ '{print $3};' | tr '\n' ' '` )
for package in ${packages[*]}; do
perl_module=$(curl -s "https://aur.archlinux.org/packages/${package}/" | tr \" "\n" | grep -m1 '^https://meta' | awk -F/ '{print $5};')
echo "https://metacpan.org/feed/distribution/${perl_module}"
done
@swiftgeek
swiftgeek / Bootlog
Last active August 29, 2015 14:18
P2270HD, Firmware T-E22PEUC-2001.2 , Uses SEMS12-LF SoC (Saturn4) and WT61P8 MCU. 38400 baud
[Channel] [tvsChDb_GetPchInfoDataByPchIndex] bPchInfoIndex = 6
tvsModuleCi_Finalize
tvsModuleMheg_Finalize
MAppMHEG_Finalize
tvsModuleDownload_Finalize
BinInfo b000
gMp3intr 1
@swiftgeek
swiftgeek / ap99-16MiB.h.patch
Created March 19, 2015 02:29
Apply to mr3420_3220v1/ap99/boot/u-boot/include/configs/ap99.h . Taken from #1 pupie post, fixed formatting and removed device-specific lines https://forum.openwrt.org/viewtopic.php?id=32512
--- ap99.h.original 2010-07-05 03:23:40.000000000 +0200
+++ ap99.h.fixed 2015-03-19 03:26:25.515365506 +0100
@@ -6,26 +6,38 @@
#define __CONFIG_H
#include <configs/ar7240.h>
+
+//Support 8M/16M flash
+#define FLASH_SIZE 16
+
@swiftgeek
swiftgeek / update-binary
Created May 28, 2014 03:00
My attempt to make update.zip sane (top of the script) + easy way for messing with initramfs contents on galaxy mini (tass)
#!/sbin/sh
# Author: Swift Geek
#Break on any errors
set -e
#
# arg 1 is API version, according to source should be 3, previous ones can trash radio.
#
# arg 2 is the pipefd "API", https://github.com/CyanogenMod/android_bootable_recovery/blob/7d531818bdd94f7dc02bd5faeb882b4f14643999/install.c
# communicate with it using the recovery api (Whole 3 commands)
# progress <frac> <secs> # Unavailable on my devices
@swiftgeek
swiftgeek / dabstick-radio-0.96.patch
Last active August 29, 2015 14:01
Patch for sdr-j/dabstick-radio
diff -rupN dabstick-radio-0.96/dabreceiver-V2/CMakeLists.txt dabstick-radio-0.96-new/dabreceiver-V2/CMakeLists.txt
--- dabstick-radio-0.96/dabreceiver-V2/CMakeLists.txt 2013-08-09 12:31:18.000000000 +0200
+++ dabstick-radio-0.96-new/dabreceiver-V2/CMakeLists.txt 2014-05-30 07:15:34.247068084 +0200
@@ -1,4 +1,5 @@
cmake_minimum_required( VERSION 2.6 )
+set ( CMAKE_MODULE_PATH ${CMAKE_ROOT}/Modules ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
set ( CMAKE_BUILD_TYPE Release )
add_definitions ( -Wall )
set (KJMP 1) # flag for MP2 decoder
diff -rupN dabstick-radio-0.96/dabreceiver-V2/backend/fib_processor.cpp dabstick-radio-0.96-new/dabreceiver-V2/backend/fib_processor.cpp
@swiftgeek
swiftgeek / PKGBUILD
Created March 29, 2014 14:01
fixed PKGBUILD for perl-alien-wxwidgets
# Contributor: Swift Geek <swiftgeek «at» gmail.com>
# Contributor: Nick Østergaard <oe.nick at gmail dot com>
pkgname=perl-alien-wxwidgets
pkgver=0.64
pkgrel=1
pkgdesc="building, finding and using wxWidgets binaries"
arch=('any')
url="http://search.cpan.org/dist/Alien-wxWidgets"
license=('GPL' 'PerlArtistic')
signal sender=org.freedesktop.DBus -> dest=:1.238 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.238"
method call sender=:1.238 -> dest=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "eavesdrop=true,type='method_call'"
method call sender=:1.238 -> dest=org.freedesktop.DBus serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "eavesdrop=true,type='method_return'"
method call sender=:1.238 -> dest=org.freedesktop.DBus serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "eavesdrop=true,type='error'"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=411 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.239"