Skip to content

Instantly share code, notes, and snippets.

View mtoutside's full-sized avatar
😈
kvlt

s.toyama mtoutside

😈
kvlt
View GitHub Profile
@mtoutside
mtoutside / utilFunction.js
Last active October 26, 2021 04:01
utility functions
/**
* valueがとる値、start1 ~ stop1をstart2 ~ stop2に変更する
*
* @param {*} value
* @param {*} start1
* @param {*} stop1
* @param {*} start2
* @param {*} stop2
* @param {boolean} trimming 返される値をstart2, stop2のレンジでカット
* @return
{"lastUpload":"2020-01-18T06:37:07.372Z","extensionVersion":"v3.4.3"}
@mtoutside
mtoutside / coc-settings.json
Created January 20, 2020 04:35
~/.vim/coc-settings.json
{
"tsserver.enableJavascript": true,
"eslint.filetypes": ["javascript", "typescript", "typescriptreact", "javascriptreact", "typescript.tsx"],
"prettier.eslintIntegration": true
}
// Make metaball
// https://www.clicktorelease.com/blog/vertex-displacement-noise-3d-webgl-glsl-three-js/
// use below pnoise 3d
// https://github.com/ashima/webgl-noise/blob/master/src/classicnoise3D.glsl
float turbulence( vec3 p ) {
float w = 100.0;
float t = -.5;
for (float f = 1.0 ; f <= 10.0 ; f++ ){
float power = pow( 2.0, f );
// https://javascript.plainenglish.io/15-helpful-javascript-one-liners-946e1d1a1653
/**
* Generating a random number within a range
*
* @param {*} min
* @param {*} max
*/
const randomNumberInRange = (min, max) =>
Math.floor(Math.random() * (max - min + 1)) + min;
@mtoutside
mtoutside / .prettierrc.json
Created January 5, 2023 09:19
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false