Skip to content

Instantly share code, notes, and snippets.

@e1blue
e1blue / codevember-2017-day-2-turn-off-the-lights.markdown
Created June 20, 2018 02:14
#CodeVember 2017 Day 2 | Turn Off The Lights

#CodeVember 2017 Day 2 | Turn Off The Lights

This is a fun little puzzle game with CSS Grid. You have to turn off all the lights, but you can only toggle whole rows and whole columns.

If you get stuck, try the RESET button, or let the computer SOLVE it for you!

NOTE: it's not really a cake, so slightly off topic, but before you can eat the cake, you have to turn off the lights ☺ EDIT: You can easily edit the board dimensions in the HTML. It's a lot easier with a bigger board.

@e1blue
e1blue / index.html
Created June 20, 2018 02:16
Music Paint
<svg id="symbols">
<symbol id="square" viewBox="0 0 128 128">
<path style="fill:none;stroke:#aad400;stroke-width:4px;stroke-linecap:square;" d="M35,43 l0,40 l30,0 l0,-40 l30,0 l0,40" />
</symbol>
<symbol id="sawtooth" viewBox="0 0 128 128">
<path style="fill:none;stroke:#c83737;stroke-width:4px;stroke-linecap:square;stroke-linejoin:bevel;" d="M30,80 l30,-40 l0,40 l30,-40 l0,40"/>
</symbol>
<symbol id="triangle" viewBox="0 0 128 128">
<path style="fill:none;stroke:#2a7fff;stroke-width:4px;stroke-linecap:square;stroke-linejoin:bevel;" d="M30,80 l17,-40 l17,40 l17,-40 l17,40"/>
</symbol>
@e1blue
e1blue / index.pug
Created June 20, 2018 02:23
Pacman Canvas + TweenMax
canvas#mycanvas
@e1blue
e1blue / index.html
Last active June 20, 2018 12:30
Vue Identicon
<div id="app"></div>
@e1blue
e1blue / index.html
Created June 23, 2018 15:16
Wavy Header
<div class="header">
<h1>Waves</h1>
<p>Waves generated with javascript and &lt;canvas&gt;.</p>
</div>
<div class="canvas-wrap">
<canvas id="canvas"></canvas>
</div>
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate rerum nemo, autem. Maiores quibusdam asperiores iste laboriosam deleniti quo ratione voluptatem expedita temporibus facere velit cum nesciunt, doloremque ducimus consequuntur numquam, accusamus porro a quam. Perspiciatis quo voluptates dolores error temporibus optio, placeat minus deserunt accusamus, doloribus repellat sed ut!</p>
<p>Beatae ullam repellendus tempore, dicta excepturi necessitatibus magnam praesentium illum voluptates nihil, fugiat est, corporis. Reiciendis veritatis facere reprehenderit nemo quod temporibus ea assumenda nulla iure, mollitia beatae debitis consequuntur a blanditiis quasi suscipit eos ab repellendus deleniti fuga accusamus officia maxime perferendis modi! Fugiat libero incidunt sunt nostrum harum?</p>
@e1blue
e1blue / index.html
Last active July 12, 2018 14:57
vue.js color gradient generator
<div id="app" :style="{background: gradient}">
<div class="container">
<transition-group name="flip-list" tag="ul">
<li v-for="(color,index) in colors" :key="color.id" :class="{shake : color.last}">
<div class="move">
<button class="up" @click="up(index)" v-if="index>0"></button>
<button class="down" @click="down(index)" v-if="index<colors.length-1"></button>
</div>
<input type="text" v-model.trim="color.hex" maxlength="7" :style="{color: color.hex}" :class="{pin : color.disabled}" :disabled="color.disabled">
<button @click="lockColor(index)" :class="{locked : color.disabled}"></button>
@e1blue
e1blue / index.html
Last active July 12, 2018 15:00
User List (react + gsap)
<div id="app"></div>
@e1blue
e1blue / index.html
Created July 12, 2018 14:52
Interactive CSS Filter React Component (with GIFs!)
<div id="app">
</div>
@e1blue
e1blue / click-hold-menu-with-rxjs-observables.markdown
Created July 12, 2018 14:55
Click & hold menu with rxjs observables
@e1blue
e1blue / index.html
Created July 12, 2018 14:58
vue.js - order and filter list animation
<div id="app">
<div class="search">
<div class="icon">
<div class="circle"></div>
<div class="bar"></div>
</div>
<div class="search-input">
<input type="text" placeholder="Search..." v-model="searchQuery">
</div>
</div>