Skip to content

Instantly share code, notes, and snippets.

View nirmalrepo's full-sized avatar

Nirmal Fernando nirmalrepo

View GitHub Profile
@nirmalrepo
nirmalrepo / 12-men-test.js
Last active February 28, 2024 18:18
12 Men Question
let allPeople = [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
let groupA = allPeople.slice(0, 4);
let groupB = allPeople.slice(4, 8);
let groupC = allPeople.slice(8, 12);
seeSawOne = weightDifference(groupA, groupB);
console.log("seeSawOne", seeSawOne);
if (seeSawOne === 0) {
@nirmalrepo
nirmalrepo / index.html
Created October 19, 2021 08:14
Three.JS dynamic blob with Perlin noise
<canvas id="canvas"></canvas>
@nirmalrepo
nirmalrepo / index.html
Created May 8, 2019 00:57
Particle Waves
<!--
ThreeJs custom waves
Original script by ThreeJS : https://threejs.org/examples/canvas_particles_waves.html
Modified version for Cloudoru by Kevin Rajaram : http://kevinrajaram.com
Date: 08/14/2014
-->
<h1>A little something for a site I'm working on. Made with the threejs library.</h1>
@nirmalrepo
nirmalrepo / gist:130e95181f692d23f5d4050a30278d11
Created February 18, 2019 21:36
Making image div grid to one height
<style>
@media screen and (min-width: 768px){
.slide-image {
overflow: hidden;
position: relative;
display:block;
height:260px;
line-height:200px;
}
.slide-image img {
@nirmalrepo
nirmalrepo / cloudSettings
Created December 18, 2017 10:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-12-05T06:15:22.050Z","extensionVersion":"v2.8.6"}
1. createClass
import React from 'react'
export const SkiDayCount = React.createClass({});
2. ES6 class
import {Component} from 'react'
export class SkiDayCount extends Component{}