Skip to content

Instantly share code, notes, and snippets.

294 people are currently looking at this profile

Luckydonald luckydonald

294 people are currently looking at this profile
  • Some basement in Equestria.
View GitHub Profile

I can confirm that the ETRX357USB-LRS+8M can be flashed with an appropriate EZSP firmware without the use of any programming hardware. So, without any guarantees (you might -but probably won’t- brick your device), here’s how:

  1. Download the firmware. I used some random blob someone put on github that at least seemed to have the right name. What could possibly go wrong, right?
  2. (Install USB-to-serial drivers for the device. Linux will load the driver automatically when you plug in; not sure about other OSes.)
  3. Install a serial port communication app that supports X-MODEM. (debian/ubuntu: sudo apt-get install minicom, installs lrzsz, too) Run it and configure it (sudo minicom -s) to use the fake serial port (/dev/ttyUSB0) at 19200 baud 8N1. Disable both hardware (RTS/CTS) and software (XON/XOFF) flow control.
luckydonald / 0 Raspberry Pi 4B - Proxmox-Pimox Homeassistant VM LXC-Containers Docker - INSTALL - Table of
Last active Nov 20, 2022
Raspberry Pi 4B: Install Proxmox/Pimox, Homeassistent, VM, LXC Containers, Docker
View 0 Raspberry Pi 4B - Proxmox-Pimox Homeassistant VM LXC-Containers Docker - INSTALL - Table of

Hello Pi

This is a writedown of how I installed my raspberry pi(s).

The base is a Proxmox, so I don't have to worry about reformat the SD card every time I wanna try out something new, as I can start VMs and LXC containers, as well as Docker containers once it's configured properly.

Note: Those files are versioned, so you can always look what changed from time to time.




NONE_TYPE = type(None)
union_params = type_hint.__args__   # this was __union_params__ in python3.5, but __args__ in 3.6+

assert union_params
is_optional = NONE_TYPE in union_params
if len(union_params) == (2 if is_optional else 1):
    # None is the first/second one, the actual type has to be the other.
 raise ValueError('MEhhhh')
luckydonald / Fallout 4 Save File
Created Apr 18, 2021 — forked from SirTony/Fallout 4 Save File
The binary format for Fallout 4 PC save files.
View Fallout 4 Save File

Fallout 4 Save File Format

The binary format for Fallout 4 PC save files. This document was created by reverse-engineering files from version of the game.

Note: This document is incomplete!

Table of Contents

View gist:a53178b2ee66dddf655143823e189d20
extern crate hyper;
extern crate url;
static HOST: &'static str = "";
macro_rules! ret_err(
($e:expr) => {{
match $e {
Ok(v) => v,
Err(e) => { println!("Line {}: {}", line!(), e); return; }
luckydonald / python_like_exception.php
Last active Mar 23, 2020
python style exception trace for PHP
View python_like_exception.php
static function python_like_exception(
Throwable $e, bool $skip_seen = true, ?array $seen = null
): string {
if ($skip_seen && !$seen) {
$seen = array();
$prev = $e->getPrevious();
if ($prev) {
$result[] = self::python_like_exception($prev, $skip_seen, $seen);
$result[] = "\nDuring handling of the above exception, another exception occurred:\n";
luckydonald / gist:cfde4c8107da30390b17ddc35b964f4a
Created Jun 11, 2019 — forked from nerones/gist:6778719
An easy way to log session data and queries with Monolog and Hooks in codeigniter. Some of the code is taken from Profiler class in the core of CI. The hook must be post_controller or post_system
View gist:cfde4c8107da30390b17ddc35b964f4a
class LoggerHook
private $CI;
function __construct()
$this->CI =& get_instance();
public function log()
def num(n):
string = ["", "", ""]
for d in str(int(n)):
for i, l in enumerate(digit(int(d)).split("\n")):
string[i] += l
# end for
# end for
return "\n".join(string)
# end def
luckydonald / function.cast.php
Created Jul 23, 2018 — forked from borzilleri/function.cast.php
PHP function to cast an object from one class to another.
View function.cast.php
* Cast an object into a different class.
* Currently this only supports casting DOWN the inheritance chain,
* that is, an object may only be cast into a class if that class
* is a descendant of the object's current class.
* This is mostly to avoid potentially losing data by casting across
* incompatable classes.
View iOS_11_webapp_statusbar_issues__index.html
<meta charset="utf-8" />
<meta name="apple-mobile-web-app-title" content="something" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, height=device-height">