Skip to content

Instantly share code, notes, and snippets.

View kuanyui's full-sized avatar
❄️
なんでそんなに慣れてんだよ!

クエン酸 kuanyui

❄️
なんでそんなに慣れてんだよ!
View GitHub Profile
@aszx87410
aszx87410 / README.md
Last active December 8, 2023 21:59
let vs var by investigating the bytecode generated by Node.js

It's the reply to the question raised by @getify on his twitter:

here's a variation on the question... will JS engines exhibit much performance difference between these two loops?

for (var i = 0; i < 100000000; i++) {
   // do some stuff, but not closure
}

for (let i = 0; i < 100000000; i++) {
@rsperl
rsperl / Makefile #snippet
Last active April 17, 2024 23:02
self-documenting makefile with colors
SHELL=/bin/bash
# to see all colors, run
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done'
# the first 15 entries are the 8-bit colors
# define standard colors
ifneq (,$(findstring xterm,${TERM}))
BLACK := $(shell tput -Txterm setaf 0)
RED := $(shell tput -Txterm setaf 1)
// ==UserScript==
// @name EmuParadise Download Workaround - 1.1.1
// @version 1.1.2
// @description Replaces the download button link with a working one
// @author Eptun
// @match https://www.emuparadise.me/*/*/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @grant none
// ==/UserScript==
@loilo
loilo / pass-slots.md
Last active May 23, 2024 16:28
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@ObserverOfTime
ObserverOfTime / WA2-Ubuntu.md
Last active February 11, 2024 07:05
Install and patch White Album 2 on Linux

For Ubuntu and other Debian-based distros

This gist is deprecated. You can find the latest instructions here.

1: Enable Japanese Locale

Check whether it's already enabled:

$ locale -a | grep ja
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygments import highlight
from pygments.lexers import JsonLexer
from pygments.formatters import TerminalFormatter
from pprint import pformat
import json
def pprint_color(obj, indent=2):
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 23, 2024 18:57
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@only-cliches
only-cliches / pixibackground.js
Last active March 14, 2024 12:07
PixiJS Background Cover & Background Container
/*
* PixiJS Background Cover/Contain Script
* Returns object
* . {
* container: PixiJS Container
* . doResize: Resize callback
* }
* ARGS:
* bgSize: Object with x and y representing the width and height of background. Example: {x:1280,y:720}
* inputSprite: Pixi Sprite containing a loaded image or other asset. Make sure you preload assets into this sprite.
@bisubus
bisubus / ES5-ES6-ES2017-ES2019 omit & pick
Last active April 13, 2024 21:03
ES5/ES6/ES2017/ES2019 omit & pick