Skip to content

Instantly share code, notes, and snippets.

import Redux from 'redux'
import WebSocket from 'websocket'
function reducer(state = {}, action) {
switch(action.type) {
case 'NEXT_SLIDE':
return state['slide'] = action.new_slide
case 'BLANK_SLIDE':
return state['blank'] = true
}
@chickencoder
chickencoder / chord.html
Created December 13, 2015 18:55
Solution to floating chords
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body {
font-size: 1.5em;
font-family: Open Sans, sans-serif;
}
Scene Component:
/**
* TODO:
* use template strings
* do not store host, port
* in state, props instead.
*
* Before Sunday..
* fully rendering chords & updating
This is just a test blog
@chickencoder
chickencoder / isReactNecessary.md
Last active January 10, 2016 14:36
An short blog post on my experience with React

Is ReactJS really necessary?

And furthermore, is React the future of front-end development?

I've been using React for several months now and for the most part, I've thoroughly enjoyed its exclusive way of doing things. React is supported by a large, enthusiastic community who are undoubtebly conviced that React - and the design patterns it enforces (or encourages) - is the future of front-end web development.

It was until very recently that I had held this view myself. So what changed?

permissions:
askyblock.*:
children:
askyblock.island.*:
children:
askyblock.island.go:
description: Allow teleporting to player island
default: true
askyblock.island.create:
description: Let the player use the /island command
@chickencoder
chickencoder / fu-session1.md
Last active January 28, 2016 21:02
Notes for FU - 2nd Feb

Keeping your faith in school.

Led by Jesse Sibley & Wilf Jevons

  1. Regularly meet with other christians to encourage one another - CUs, Church etc.
  2. Quiet time - socialise with God, through prayer, reading, music daily.
  3. Keep in touch with your SCFs.
  4. Bring God to school, Show & tell

Possible Bible Verses

Colossians 3:16

const chords = "Bless the Lord Oh my soul<Chord name = 'F' /><br>Ohhh"
let lines = chords.split('<br>')
lines = lines.map((value, index) => {
if (findChordinLine) {
// Take extracted chord,
// Remove from line
// Insert new
}
})
@chickencoder
chickencoder / life_cycle_stars.md
Created March 30, 2016 21:28
The Life Cycle Of Stars

The Life Cycle of Stars

  • Stars start out as clouds of gas and dust known as nebulas.
  • Under gravitational energy, which is converted to heat energy, the nebula begins to spiral and increase in temperature.
  • Hydrogen nuclei begin to undergo thermonuclear fusion to form helium nuclei which releases energy.
  • At this point the star is in its "main sequence".

After a while, the star runs out of hydrogen and begins to cool. The star then become a Red Giant.

  • Small stars then loose their outler layers of mass which form planetary nebulas. A white dwarf is left behind and slowly cools into nothingness.
  • Large stars continue to undergo nuclear fusion and eventually explode into supernoves and then progress into a dense core called a Neutron Star which may become a BLACK HOLE...
\%([a-z]+)[\s]+\'([a-zA-Z09]+)\'[\s]*