Skip to content

Instantly share code, notes, and snippets.

View wang1212's full-sized avatar
🙂
Working and Reading

不如怀念 wang1212

🙂
Working and Reading
View GitHub Profile
@bookfere
bookfere / fix-google-translate-cn.bat
Last active March 27, 2024 13:39
Fix Google Translate CN for Windows
:: Copyright (c)2022 https://bookfere.com
:: This is a batch script for fixing Google Translate and making it available
:: in the Chinese mainland. If you experience any problem, visit the page below:
:: https://bookfere.com/post/1020.html
@echo off
setlocal enabledelayedexpansion
chcp 437 >NUL
set "ips[0]=74.125.137.90"
@sindresorhus
sindresorhus / esm-package.md
Last active May 17, 2024 14:07
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@juniorcesarabreu
juniorcesarabreu / How to Install Older version of Chrome Extensions.md
Last active March 10, 2024 17:11
How to Install Older version of Chrome Extensions
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 16, 2024 19:51
Hyperlinks in Terminal Emulators
@ezze
ezze / zoomLevel.js
Created April 18, 2017 00:03
Cesium: calculate camera heights for tile zoom levels
var zoomLevelHeights = getZoomLevelHeights(1);
for (var i = 0; i < zoomLevelHeights.length; i++) {
console.log('Level: ' + zoomLevelHeights[i].level + ', camera height: ' + zoomLevelHeights[i].height);
}
function getZoomLevelHeights(precision) {
precision = precision || 10;
var step = 100000.0;
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 17, 2024 06:13
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
@kripken
kripken / hello_world.c
Last active January 17, 2024 12:15
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@Hendrixer
Hendrixer / editor.css
Last active March 3, 2024 14:29
VS code custom CSS for theme
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content {
background-color: rgba(40, 44, 52, 1) !important;
}
.tabs-container, .tab, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}
.tab.active, .tab {
border-right: 0px !important;
@ayamflow
ayamflow / .js
Created February 16, 2016 01:37
Three.js - get visible width/height in pixels for an object
// http://stackoverflow.com/a/13351534
var vFOV = this.camera.fov * Math.PI / 180;;
var h = 2 * Math.tan( vFOV / 2 ) * this.camera.position.z;
var aspect = width / height;
var w = h * aspect;
@vasanthk
vasanthk / System Design.md
Last active May 16, 2024 20:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?