Skip to content

Instantly share code, notes, and snippets.

@nqthqn
Created March 17, 2017 19:48
Show Gist options
  • Save nqthqn/9605d3cca8860fbc6f85e790904d0751 to your computer and use it in GitHub Desktop.
Save nqthqn/9605d3cca8860fbc6f85e790904d0751 to your computer and use it in GitHub Desktop.
elm pair programming projects

1

Recreate the rainbow: http://codepen.io/terabaud/pen/GWvJem

c = a.getContext("2d")
w = a.width = (innerWidth/30)|0
h = a.height = (innerHeight/30)|0
z = 0
function L(t){
	with(Math)
		for(y0=h;y0--;)
			for(x0=w;x0--;)
				T=s2.value*t/1e5,
				x=x0+cos(T)*(w/2),y=y0+sin(T)*(h/2),µ=T*10+x*y/(s1.value*1e2),
					c.fillStyle=`hsl(${(x+(T|0)+round(cos(µ)*sin(µ)*360))%360}, 100% , 50%)`,
					c.fillRect(x0,y0,1,1)
	requestAnimationFrame(L)
}()

2

Build on this timezone thing http://jsbin.com/cehixuragu/edit?html,js,output

function display(){
  var pdtTime = document.getElementById('time').value;
  
  document.getElementById('pdt').innerHTML = pdtTime;

  document.getElementById('edt').innerHTML = parseFloat(pdtTime) + 3;

}

2 b

Add functionality for integration with ellie, slack, github, appear.in

"pairing with people in different timezones"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment