Skip to content

Instantly share code, notes, and snippets.

@psema4
psema4 / blocks.py
Created September 10, 2024 14:26 — forked from thomasahle/blocks.py
Manim heat exchange
from manim import *
import numpy as np
class HeatTransferAnimation(Scene):
def construct(self):
# Configuration
num_blocks = 10
block_size = 1
spacing = 0.1
@psema4
psema4 / List of in-browser VMs.md
Created April 9, 2024 11:36 — forked from SMUsamaShah/List of in-browser VMs.md
List of Javascript based virtual machines running in browser
@psema4
psema4 / JavaScript Analog Clock.html
Created April 20, 2023 23:23 — forked from stavrossk/JavaScript Analog Clock.html
Simple Analog Clock using HTML5 canvas and JavaScript.
<!doctype html>
<html>
<head>
<title>Analog Clock using Canvas</title>
</head>
<body>
@psema4
psema4 / Unicode table
Created September 11, 2022 15:15 — forked from ivandrofly/Unicode table
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:
@psema4
psema4 / index.html
Last active February 23, 2022 02:40 — forked from bellbind/index.html
[threejs] simplified gltf2 loader example
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/three"></script>
<script
src="https://unpkg.com/three/examples/js/loaders/GLTFLoader.js"
></script>
<script src="script.js" defer="defer"></script>
</head>
@psema4
psema4 / JSGameFramework2020.html
Created August 21, 2021 01:38 — forked from xem/JSGameFramework2020.html
JS game framework 2020
<body style=margin:0>
<canvas id=a>
<script>
// initialize 2D canvas (c)
// initialize game state (s)
// initialize keys states (u,r,d,l for directions, k for all the keyboard)
c=a.getContext`2d`,k=[u=r=d=l=s=0]
// (initialize your global variables here)
@psema4
psema4 / squirrel3.js
Created August 12, 2021 21:26
An implementation of the Squirrel3 Noise-based RNG
// Based on the GDC 2017 talk "Math for Game Programmers: Noise-Based RNG"
// https://www.youtube.com/watch?v=LWFzPP8ZbdU&ab_channel=GDC
const BIT_NOISE1 = 0xB5297A4D
const BIT_NOISE2 = 0x68E31DA4
const BIT_NOISE3 = 0x1B56C4E9
const PRIME1 = 198491317
const PRIME2 = 6542989
class Squirrel3 {
@psema4
psema4 / Has weird right-to-left characters.txt
Created April 15, 2021 16:31 — forked from endolith/Has weird right-to-left characters.txt
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@psema4
psema4 / tmux-cheatsheet.markdown
Created March 7, 2021 16:40 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@psema4
psema4 / rename-tiles-to-sprites.sh
Created November 2, 2019 23:02
search and replace in filenames
# Search and replace filenames in the current directory
#
# Example:
# tile-000.png
# tile-001.png
# tile-002.png
#
# becomes
# sprite-000.png
# sprite-001.png