Skip to content

Instantly share code, notes, and snippets.

View Inclushe's full-sized avatar

Ethan John Walker Inclushe

View GitHub Profile
function rand(min,max,round) {
if(round === false){
return (Math.random() * (max-min)) + min;
}
else {
return Math.round((Math.random() * (max-min)) + min);
}
}
function createNoiseFromColors(w, h){
var dis = {
is: {
how: {
this: {
is: {
done: "Yeah"
}
}
}
}
module.exports = {
characters: ['᠎', '​'],
encode: function (input) {
var output = ''
var binary = ''
for (var char = 0; char < input.length; char++) {
var dec = input.charCodeAt(char).toString(2)
binary += Array(9 - dec.length).join('0') + dec
}
for (var bit = 0; bit < binary.length; bit++) {

Keybase proof

I hereby claim:

  • I am inclushe on github.
  • I am ethanw (https://keybase.io/ethanw) on keybase.
  • I have a public key ASAz67iPPKRX1g6Ad4Wj0qVqPxeES2Or-Sm5aS6oL3iYOQo

To claim this, I am signing this object:

@Inclushe
Inclushe / gulp-directory-template.md
Last active April 9, 2019 13:10
Gulpfile using Stylus, Pug, Browsersync, and Browserify.

Directory Template

📁 src
  📁 assets
    📁 images
    📁 videos
  📁 js
  📁 pug
 📁 templates
/* What does the app's SQL look like? */
CREATE TABLE scores (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
score INTEGER
);
CREATE TABLE users (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@Inclushe
Inclushe / Makefile
Last active February 14, 2019 23:28
Grand Dad in Fortran 95
main:
gfortran grand.f95 -o ./grand
@Inclushe
Inclushe / main.hs
Last active March 4, 2019 16:48
A very professional Haskell program.
main = print $ iterate succ 69 !! 351
@Inclushe
Inclushe / package-refracted.js
Created May 30, 2019 02:10
dreamx3 package-refracted pretty print
function in_array(a, b, c) {
var d = '';
if (!c) {
for (d in b) if (b[d] == a) return !0
} else for (d in b) if (b[d] === a) return !0;
return !1
}
function ucFirst(a) {
return a ? a.charAt(0).toUpperCase() + a.slice(1) : a
}

Clean Code Notes

Intro Notes

  • 5S Principles
    • organization - seiri (整理)
      • Use suitable naming
    • tidiness - seiton (整頓)
      • A place for everything, and everything in its place.
  • cleaning - seisō (清掃)