Skip to content

Instantly share code, notes, and snippets.

@JShorthouse
JShorthouse / gba-gcc-compiling-linux.md
Last active May 20, 2024 20:04
Compiling GBA programs on Linux with GCC

Compiling GBA programs on Linux with GCC

There is a strange lack of guides and tools online for compiling Gameboy Advance homebrew programs on Linux. I didn't want to use devkitpro - their installation method of requiring you to use a forked version of pacman is extemely strange and I didn't want to install all of that on my system just to complile some programs.

The only other guides I found for Linux were this one and this one which both involve compiling custom versions of GCC and assosicated libraries. This lead me down a road of pain, after spending multiple hours fixing compiler errors only to create new errors I gave up. I thought that their had to be a simpler way, and there is!

The solution

Debian already has a version of GCC that can compile ARM programs in the repos, no manual compiling necessary! The package is called arm-none-eabi-gcc.

@martgnz
martgnz / .block
Last active May 20, 2024 19:59
Barcelona Metro
license: mit
border: none
height: 650
@manuarora700
manuarora700 / globe.json
Last active May 20, 2024 19:58
Globe JSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@konstantin24121
konstantin24121 / verifyTelegramWebAppData.tsx
Last active May 20, 2024 19:57
Telegram Bot 6.0 Validating data received via the Web App node implementation
const TELEGRAM_BOT_TOKEN = '110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw'; // https://core.telegram.org/bots#creating-a-new-bot
export const verifyTelegramWebAppData = async (telegramInitData: string): boolean => {
// The data is a query string, which is composed of a series of field-value pairs.
const encoded = decodeURIComponent(telegramInitData);
// HMAC-SHA-256 signature of the bot's token with the constant string WebAppData used as a key.
const secret = crypto
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active May 20, 2024 19:55
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
This file has been truncated, but you can view the full file.
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|BUJUMBA BUYOGA
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|BUSWA KAMWANYI
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|KIBANGA BULIGO
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|KULUGULU
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|BUBEMBE
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|BUYIGI
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|KAGOONYA
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|KISUJJU
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|KIVUNZA
This file has been truncated, but you can view the full file.
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|BUJUMBA BUYOGA
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|BUSWA KAMWANYI
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|KIBANGA BULIGO
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUJUMBA|KULUGULU
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|BUBEMBE
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|BUYIGI
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|KAGOONYA
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|KISUJJU
Uganda|KALANGALA|BUJUMBA|BUJUMBA|BUNYAMA|KIVUNZA
@woolpeeker
woolpeeker / draw_matches.py
Last active May 20, 2024 19:54
Python replacement for cv2.drawMatches(), for which there are no Python bindings in a release version.
# drawMatches numpy version
def draw_matches(img1, kp1, img2, kp2, matches, color=None):
"""Draws lines between matching keypoints of two images.
Keypoints not in a matching pair are not drawn.
Places the images side by side in a new image and draws circles
around each keypoint, with line segments connecting matching pairs.
You can tweak the r, thickness, and figsize values as needed.
Args:
img1: An openCV image ndarray in a grayscale or color format.
kp1: ndarray [n1, 2]
--- General ---
Undo: cmd + Z
Redo: cmd + shift + Z
Redo: cmd + Y
Setup/Animate Mode: cmd + TAB
Zoom To Fit: cmd + shift + F
Zoom To 100%: cmd + F
Lock Zoom:
Fullscreen: cmd + shift + opt + F
Always On Top: cmd + shift + opt + T
@linuswillner
linuswillner / install-neofetch-motd.sh
Created February 9, 2020 15:31
Add neofetch display to system login scripts
#!/bin/bash
sudo apt install neofetch
sudo cp motd.sh /etc/profile.d/motd.sh
sudo chmod +x /etc/profile.d/motd.sh