Skip to content

Instantly share code, notes, and snippets.

View UnsignedArduino's full-sized avatar

Cyrus Yiu UnsignedArduino

View GitHub Profile
@UnsignedArduino
UnsignedArduino / on_page_console.js
Last active April 6, 2022 21:01
On page console
// https://gist.github.com/UnsignedArduino/e23b8329c3a786d1e4e99d8ee941436e
// Include this JavaScript file in an HTML file and it will add a DIV element to the bottom of the page which will contain console output and
// an textarea to run JavaScript code!
// Example script include tag: <script src="/on_page_console.js"></script>
// Set false to do nothing
const show_on_page_console = true;
// Code reviewed: https://codereview.stackexchange.com/a/275550/206220
@UnsignedArduino
UnsignedArduino / MakeCode Arcade Extensions.md
Last active March 17, 2022 09:51
Useful MakeCode Arcade Extensions

MakeCode Arcade Extensions

This is a list of MakeCode Arcade extensions that I find super useful in my projects.

NOTE: This gist is depreciated! I've made a new repo for this which you can submit pull requests for extensions you want in! You can find it here.

Built-in extensions

These extensions are already built in to the editor, all you have to do is go to the toolbox, open the Advanced tab, click on Extensions, and click on the extension you want to import!

arcade-sprite-data

It's local variables, but for sprites! Super useful for saving certain attributes of a sprite like the health of an enemy. This will add a section full of blocks called Data under the Sprites category in the toolbox.

Official docs | Github repo | Forum post

@anecdata
anecdata / code.py
Last active May 24, 2025 17:02
CircuitPython Pin Finder: microcontroller.pin to board mappings
# SPDX-FileCopyrightText: 2020 anecdata
#
# SPDX-License-Identifier: MIT
import microcontroller
import board
for pin in dir(microcontroller.pin):
if isinstance(getattr(microcontroller.pin, pin), microcontroller.Pin):
print("".join(("microcontroller.pin.", pin, "\t")), end=" ")
@user01
user01 / torch.xor.py
Created April 1, 2017 01:53
Toy XOR network with pyTorch
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
EPOCHS_TO_TRAIN = 50000
class Net(nn.Module):
@ivandrofly
ivandrofly / Unicode table
Created May 4, 2014 02:20
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character: