Skip to content

Instantly share code, notes, and snippets.

View balderclaassen's full-sized avatar

Balder balderclaassen

View GitHub Profile
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

do{
confirm("Hello. This is a Rock Paper Scissors game for 2 players. You will be using the same keyboard and therefore it is neccesary that you look the other way while the other player is making their choice. When you start, a new dialog will pop up asking the first player to make their choice. Then a second dialog for the other player. After this a dialog will display the results. OK can be used to start another game and Cancel to quit. Click OK to begin.")
var ChoiceP1 = prompt("Rock, Paper, Scissors (Type your choice below. To prevent the other person from hearing what you type, R, P and S work as well.)")
if(ChoiceP1=="Rock" || ChoiceP1=="rock" || ChoiceP1=="R" || ChoiceP1=="r" || ChoiceP1=="ROCK"|| ChoiceP1== "Steen" || ChoiceP1=="Sten")
{
ChoiceP1=1
}