Skip to content

Instantly share code, notes, and snippets.

View Q-Bert-Reynolds's full-sized avatar

Nolan Baker Q-Bert-Reynolds

View GitHub Profile
Dec 09 00:12:12.597 ATT Send 0x0056 B8:8A:EC:E9:2D:8D Exchange MTU Request - MTU: 527 56 00 07 00 03 00 04 00 02 0F 02
Dec 09 00:12:12.686 ATT Send 0x0056 B8:8A:EC:E9:2D:8D Read By Group Type Request - Start Handle: 0x0001 - End Handle: 0xFFFF - UUID: GATT Primary Service Declaration 56 00 0B 00 07 00 04 00 10 01 00 FF FF 00 28
Dec 09 00:12:12.746 ATT Send 0x0056 B8:8A:EC:E9:2D:8D Read By Group Type Request - Start Handle: 0x0035 - End Handle: 0xFFFF - UUID: GATT Primary Service Declaration 56 00 0B 00 07 00 04 00 10 35 00 FF FF 00 28
Dec 09 00:12:12.806 ATT Send 0x0056 B8:8A:EC:E9:2D:8D Read By Group Type Request - Start Handle: 0xFF06 - End Handle: 0xFFFF - UUID: GATT Primary Service Declaration 56 00 0B 00 07 00 04 00 10 06 FF FF FF 00 28
Dec 09 00:12:12.866 ATT Send 0x0056 B8:8A:EC:E9:2D:8D Read By Type Request - Start Handle: 0x0010 - End Handle: 0x0013 - UUID: GATT Characteristic Declaration 56 00 0B 00 07 00 04 00 08 10 00 13 00 03 28
@Q-Bert-Reynolds
Q-Bert-Reynolds / map_loader.asm
Created April 18, 2020 15:54
Allows you to scroll through large maps. Moving up and left can be buggy. Probably some other broken stuff.
IF !DEF(MAP_LOADER)
MAP_LOADER SET 1
INCLUDE "src/beisbol.inc"
INCLUDE "maps/overworld.asm"
SECTION "Map Loader", ROM0
SetMapTilesLeftRight: ;hl = bank shift, a = screen offset
push hl;bank shift
push af;screen offset
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour
{
public static Spawner spawner;
public GameObject[] prefabs;
List<GameObject>[] pools;
import os
import csv
import xml.etree.ElementTree as tree
bank = 0
data_written = 0
def main():
for root, folders, files in os.walk("./maps"):
name = os.path.basename(root)
@Q-Bert-Reynolds
Q-Bert-Reynolds / AcceptTokens.cs
Last active October 2, 2017 04:46
using Cadence to accept tokens
// Add TokenManager.prefab and (optionally) SettingsManager.prefab to your scene.
// Put stuff like this in your main menu
using UnityEngine;
using Cadence;
public class AcceptTokens : MonoBehaviour {
// listen for TokenManager events
void OnEnable () {
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
public class Plane : MonoBehaviour {
[Range(2,100)]public int width = 10;
[Range(2,100)]public int length = 10;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
[ExecuteInEditMode]
public class ColorWheel : MonoBehaviour {
[Range(3, 36)] public int segments = 6;
@Q-Bert-Reynolds
Q-Bert-Reynolds / cardReader.py
Last active May 6, 2017 22:55
Reads input from a generic magnetic card reader and charges it 50 cents through Stripe.
import stripe
stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"
while True:
swipe_data = raw_input()
if swipe_data[:2] == "%B":
fields = swipe_data[2:].split("^")
card_number = fields[0]
name = fields[1]
year = fields[2][:2]
using UnityEngine;
public class CoroutineExample : MonoBehaviour {
void Start () {
StartCoroutine("YourCoroutine");
}
IEnumerator YourCoroutine() {
// do something immediately
@Q-Bert-Reynolds
Q-Bert-Reynolds / gist:e03b9e8b2fbc186ef189
Created May 7, 2015 03:53
getting the unity terrain brush size
// to get the terrain brush size in an editor script
EditorPrefs.GetInt("TerrainBrushSize")
// if you need to get the terrain brush size from a non-editor script (monobehaviour)
System.Type editorPrefs = System.Type.GetType("UnityEditor.EditorPrefs, UnityEditor", false, false);
System.Type[] paramTypes = new System.Type[]{ typeof(string) };
System.Reflection.MethodInfo method = editorPrefs.GetMethod(
"GetInt",
BindingFlags.Public | BindingFlags.Static,
null,