Skip to content

Instantly share code, notes, and snippets.

View hmmhmmhm's full-sized avatar
๐Ÿงฏ
BURNING!!

<hmmhmmhm/> hmmhmmhm

๐Ÿงฏ
BURNING!!
View GitHub Profile
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active May 8, 2026 01:59
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework โ€” unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@OrionReed
OrionReed / dom3d.js
Last active May 4, 2026 11:01
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ยฏ\\_(ใƒ„)_/ยฏ
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@virolea
virolea / upload.js
Last active April 9, 2026 15:39
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@Zezombye
Zezombye / owo.txt
Last active January 8, 2026 01:58
Overwatch custom game icon list
This glitch has returned with team names: https://i.imgur.com/vVaQvH9.png
Patched on 1.48 though.
All credit goes to Sparkette, she was the one who found that glitch!
!!!!
New album, way better organized
ALL sprays, player icons, achievement icons, and other stuff!
https://imgur.com/a/HJoeHy1
@hmmhmmhm
hmmhmmhm / sigungu.json
Last active December 27, 2025 06:09
ํ•œ๊ตญ์˜ ๋ชจ๋“  ์‹œ/๊ตฐ/๊ตฌ ์ „๊ตญ ์ง€์—ญ ์ขŒํ‘œ JSON ๋Œ€ํ•œ๋ฏผ๊ตญ ์ง€์—ญ ์ขŒํ‘œ pre_rendered
{
"์„œ์šธํŠน๋ณ„์‹œ/๊ฐ•๋‚จ๊ตฌ": {
"lat": "37.4951",
"long": "127.06278"
},
"์„œ์šธํŠน๋ณ„์‹œ/๊ฐ•๋™๊ตฌ": {
"lat": "37.55274",
"long": "127.14546"
},
"์„œ์šธํŠน๋ณ„์‹œ/๊ฐ•๋ถ๊ตฌ": {
@Brandawg93
Brandawg93 / google_login.ts
Last active November 6, 2025 04:08
Login to Google Account via Puppeteer
import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest
import * as readline from 'readline';
puppeteer.use(pluginStealth());
// Use '-h' arg for headful login.
const headless = !process.argv.includes('-h');
// Prompt user for email and password.
@Rich-Harris
Rich-Harris / README.md
Last active August 12, 2025 09:56
first-class binding syntax

A modest proposal for a first-class destiny operator equivalent in Svelte components that's also valid JS.

Svelte 2 has a concept of computed properties, which are updated whenever their inputs change. They're powerful, if a little boilerplatey, but there's currently no place for them in Svelte 3.

This means that we have to use functions. Instead of this...

<!-- Svelte 2 -->
<h1>HELLO {NAME}!</h1>
@ohmeow
ohmeow / 06_a_langraph_instructor.ipynb
Created October 11, 2024 20:34
LangGraph + Instructor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nerdyman
nerdyman / resolve-tsconfig-path-to-webpack-alias.js
Last active June 19, 2025 19:38
Convert TypeScript tsconfig paths to webpack alias paths
const { resolve } = require('path');
/**
* Resolve tsconfig.json paths to Webpack aliases
* @param {string} tsconfigPath - Path to tsconfig
* @param {string} webpackConfigBasePath - Path from tsconfig to Webpack config to create absolute aliases
* @return {object} - Webpack alias config
*/
function resolveTsconfigPathsToAlias({
tsconfigPath = './tsconfig.json',