Skip to content

Instantly share code, notes, and snippets.

@tomasdev
tomasdev / minecraft-emoji.md
Last active May 2, 2024 15:06
Minecraft allowed emojis

Minecraft allowed emojis

Ever wondered how to insert emoji in minecraft? Well turns out Minecraft supports only a subset of emoji (old one) but you can copy-paste these in it!

Screenshot of the emojis being rendered in Minecraft

These also look great on signs!

Minecraft sign with glowing effect showcasing arrows

@benclmnt
benclmnt / advice.md
Last active May 2, 2024 15:05
NUS CS Planning

Module Planning

Here be some of my notes on how to plan your CS career (specifically NUS).

First things first, I encourage you to have your own module plan (say, in a Google Sheets). You can start with the suggested module plan, but they are quite generic and might not suit your personal goals (e.g. some advanced modules you'd like to take have prerequisites that are offered in odd semesters only).

Having your own module plan will also make you easier to include other non-academic activities too.

General advice

  • Take as many foundational (core) modules while you can. You never want to be left behind due to missing prerequisites.
@tkfu
tkfu / srd_5e_monsters.json
Last active May 2, 2024 15:04
A JSON file with all the D&D 5e SRD monster data
[
{
"name": "Aboleth",
"meta": "Large aberration, lawful evil",
"Armor Class": "17 (Natural Armor)",
"Hit Points": "135 (18d10 + 36)",
"Speed": "10 ft., swim 40 ft. ",
"STR": "21",
"STR_mod": "(+5)",
"DEX": "9",

What are mixins?

Mixins are a way to inject code or change the minecraft source code directly and should be use with caution. If you can do a PR to Forge or use an event, try those first. If all else fails, then mixins may be a good option to look into. Here are some resources for mixins:

Now, I'll be honest, the official mixin doc is kind of terrible to learn from for most people. It's extremely dense and and really only helps people who already knows in-depth bytecode and stuff. But most modders aren't like that and just wants to do small stuff lol. But I'll give you the run-down here. There's a few kinds of mixins that you will encounter quite often.

@iamtraction
iamtraction / genTwitchAccessToken.sh
Created November 24, 2020 05:49
Generate Twitch Access Token. Usage: ./genTwitchAccessToken.sh CLIENT_ID CLIENT_SECRET
#!/bin/bash
#
# Usage:
# ./genTwitchAccessToken.sh CLIENT_ID CLIENT_SECRET
curl -X POST "https://id.twitch.tv/oauth2/token?client_id=$1&client_secret=$2&grant_type=client_credentials"
@zmts
zmts / tokens.md
Last active May 2, 2024 15:03
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
Me:
I am looking to build a simple GUI site that allows me to paste in some text, click "rewrite", and get rewritten, cleaned-up text back. This input text is ran through the Claude API to rewrite it. The GUI should be very simple. I just want a text box for input and a text box for output. I also two sliders on the side with labels on the ends:
Tone: casual on the left, formal on the right. The middle instructs the model to keep the tone/voice the same.
Length: shorter on the left, longer on the right.
Above these sliders, I want a model selector dropdown that let's me pick which Claude model to use. I also want a copy text button under the output textbox. The three Claude models are:
claude-3-opus-20240229. Display name "Claude 3 Opus".
claude-3-sonnet-20240229. Display name "Claude 3 Sonnet".
claude-3-haiku-20240307. Display name "Claude 3 Haiku".
@ericaroy
ericaroy / Android Home
Last active May 2, 2024 15:03
Setting Android Home on Mac
Note for me to remember how to set Android Home on Mac
Open Terminal and type in..
nano ~/.bash_profile
Add the below paths
The path should be where your android installation is located
export ANDROID_HOME=/Users/username/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save file and type in terminal...
source ~/.bash_profile
@srvanderplas
srvanderplas / Rpkginstall
Created May 2, 2024 15:00
Install all R packages loaded in any files within a folder
#!/bin/bash
# This concatenates array values using a multi-character separater.
# https://dev.to/meleu/how-to-join-array-elements-in-a-bash-script-303a
joinByString() {
local separator="$1"
shift
local first="$1"
shift
printf "%s" "$first" "${@/#/$separator}"
@askpatrickw
askpatrickw / ESP32S2-Camera-Interface-Research.md
Last active May 2, 2024 15:00
Research about the ESP32-S2 Camera Interface

Research about the ESP32-S2 Camera Interface

I am very interested in the ESP32-S2's camera port and the possibility of using it for a variety of MicroPython\CircuitPython projects. My hope is that the ESP32-S2 will the ability to do do things similiar to what is possible on the Raspberry Pi. Today there is no ESP32-S2 board available which exposes this port, and no camera modeles, but I wanted to understand the hardware capabilities to understand what might be possible and just as important, what is not.

This write up is based on solely on a morning's worth of research. If there are errors