Skip to content

Instantly share code, notes, and snippets.

@jesuslg123
jesuslg123 / __init__.py
Created July 2, 2024 20:47
RotorHazard class ranking plugin for order heat + fast lap for last of the heat and first of the next one
''' Class ranking method: By ..... '''
import logging
import RHUtils
from eventmanager import Evt
from RHRace import StartBehavior
from Results import RaceClassRankMethod
logger = logging.getLogger(__name__)
@jesuslg123
jesuslg123 / ACCIF405.h
Last active July 3, 2024 03:32
Acci FC - Target files
/*
* This file is part of Betaflight.
*
* Betaflight is free software. You can redistribute this software
* and/or modify this software under the terms of the GNU General
* Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later
* version.
*
* Betaflight is distributed in the hope that it will be useful,
@jesuslg123
jesuslg123 / how_to.md
Created October 31, 2023 10:28 — forked from rskelley9/how_to.md
Workaround: Connect your Chromecast to a Hotel Wireless Network

About

I recently relocated for new employment. I've been staying in an extended stay hotel for about 3 weeks now. The hotel I'm staying in gives its guests free Wifi access. However, it requires users to accept terms and conditions on a splash page via browser interface before they can use the network. This makes it difficult to use my Chromecast with the network, as it doesn't have a means of accessing that splash page. While I could call the IT help line, I decided to explore a work-around.

Like many networks, my hotel's network attempts to improve security by using MAC address filtering. Luckily, Mac OS X (10.4 - 10.10) makes it very easy to spoof your network card's MAC address.

Here's how to add a devices like Chromecast, AppleTV, Roku to a wireless network that requires a browser to authenticate and accept terms and conditions.

Before You Start

@jesuslg123
jesuslg123 / target.config
Last active November 20, 2023 05:51
Acci FPV Flight Controller setup
# Betaflight / STM32F405 (S405) 4.1.0 Oct 16 2019 / 11:57:16 (c37a7c91a) MSP API: 1.42
#define USE_ACC_SPI_MPU6000
#define USE_GYRO_SPI_MPU6000
#define USE_FLASH_M25P16 // 16MB Micron M25P16
#define USE_FLASH_W25M // 16, 32, 64 or 128MB Winbond stacked die support
board_name ACCIF405US_I2C
manufacturer_id ACCI_FPV
@jesuslg123
jesuslg123 / main.py
Last active April 6, 2022 14:51
Runcam 4K(XV) to 4K 4:3
import os
import subprocess
import glob
def delete_file(file_path):
print('removing: ' + file_path)
subprocess.call(['rm', file_path])
def create_folder(name):
print('creating folder: ' + name)
@jesuslg123
jesuslg123 / racing_debug_menu.xml
Last active April 5, 2022 19:48
DJI Debug Menu XML
<mmsdialog>
<childwindow name="racing_debug_win" dx="600px" dy="420px-270" w="500px" h="400px" alignment="top-left" show="false"
bgimage="bg/secondarymenu_bg_default.png">
<hbox>
<gap />
<vbox size="400px">
<gap />
<menu name="racing_debug_menu" size="400px" class="racing_osd_switch_menu_class" inputmode="MOVE" vloop = "true" alignment="center">
<menuitem
widget.icon.image.name=""

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@jesuslg123
jesuslg123 / SmoothQ Bluetooth
Last active July 23, 2020 15:29
SmoothQ Bluetooth traffic data
This documment contains a work in progress definition of Zhiyun SmoothQ bluetooth protocol by reverse engeniering using iOS packetLogger and Zhiyun Android app.
*This document is always using HEX instead of decimal
Sample: 0610 0108 0068 BB
- 06 = Command Id (6 Remote mode?)
- 10 = Interaction code
- 01 = Interaction code
- 08 = Parameter
- 00 = Parameter
@jesuslg123
jesuslg123 / HowTo.md
Last active November 14, 2019 13:59
Reveal 13
@jesuslg123
jesuslg123 / .bash_profile
Last active October 9, 2019 09:07
Bash prompt with time and branch
# Git branch & date in prompt.
COLOR_PROMT="\[\033[00m\]"
COLOR_GIT="\[\033[33m\]"
COLOR_DATE="\[\033[34m\]"
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="$COLOR_DATE[\t]$COLOR_PROMT \u@\h \W$COLOR_GIT\$(parse_git_branch)$COLOR_PROMT $ "