Skip to content

Instantly share code, notes, and snippets.

View kernelsoe's full-sized avatar
⚒️
Crafting ...

Kernel Soe kernelsoe

⚒️
Crafting ...
View GitHub Profile
@primaryobjects
primaryobjects / perceptron.js
Last active October 5, 2022 00:37
Perceptron in JavaScript, a simple example. Neural network. See https://jsfiddle.net/qu960cc2/1/
function Perceptron(opts) {
if (!opts) opts = {}
var debug = 'debug' in opts ? opts.debug : false;
var weights = 'weights' in opts
? opts.weights.slice()
: []
var threshold = 'threshold' in opts
@DawidMyslak
DawidMyslak / vue.md
Last active April 22, 2024 12:49
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@matthewjberger
matthewjberger / instructions.md
Last active April 7, 2025 11:31
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@carloscabo
carloscabo / is_ios_safari.js
Created March 28, 2017 13:50
JS Detect Safari on iOS devices
(function(){
var
is_ios = /iP(ad|od|hone)/i.test(window.navigator.userAgent),
is_safari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);
if ( is_ios && is_safari ) {
var
$html = document.documentElement,
classes = $html.className.concat(' is-ios-safari');
$html.className = classes;
}
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active April 19, 2025 01:52
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
@knee-cola
knee-cola / ProgressiveImgLoader.js
Last active March 6, 2025 18:53
simple progressive texture image loader for Three.js
/**
* @author knee-cola / https://github.com/knee-cola
* Original file URL: https://gist.github.com/knee-cola/37875bc4359609b96c9f329cd2a68fa1
*/
// This is a simple progressive image loader for Three.js
// It enables the smaller image files to be loaded first,
// before the big texture image is fully loaded.
//
// The images are loaded in the order they are passed
@atungare
atungare / parser.js
Created December 17, 2016 00:15
JS lisp parser
function readToken (token) {
if (token === '(') {
return {
type: 'OPENING_PARENS'
};
} else if (token === ')') {
return {
type: 'CLOSING_PARENS'
};
} else if (token.match(/^\d+$/)) {
@gkhays
gkhays / DrawSineWave.html
Last active March 4, 2025 13:49
Oscillating sine wave, including the steps to figuring out how to plot a sine wave
<!DOCTYPE html>
<html>
<head>
<title>Sine Wave</title>
<script type="text/javascript">
function showAxes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting