Skip to content

Instantly share code, notes, and snippets.

View wdehaes's full-sized avatar

Willem Dehaes wdehaes

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wdehaes on github.
  • I am wdehaes (https://keybase.io/wdehaes) on keybase.
  • I have a public key ASA3dOUUg2POTlIqBwgyVdUPc1WOEYH5EhZ2gknDkUhUMQo

To claim this, I am signing this object:

// Run this example by adding <%= javascript_pack_tag 'hello_react' %> to the head of your layout file,
// like app/views/layouts/application.html.erb. All it does is render <div>Hello React</div> at the bottom
// of the page.
import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
const Hello = props => (
<div>Hello {props.name}!</div>

Keybase proof

I hereby claim:

  • I am wdehaes on github.
  • I am willemdehaes (https://keybase.io/willemdehaes) on keybase.
  • I have a public key whose fingerprint is 6648 C7B4 9F0C ED7F 88CD 7E67 B14B 20DA 1F58 5A0C

To claim this, I am signing this object:

@wdehaes
wdehaes / index.html
Created September 30, 2016 00:44
A simple browser-based game of 15-puzzle. Refresh if you are stuck and want to start a new game.
<!DOCTYPE html>
<html>
<head>
<title>Puzzle</title>
<style>
canvas {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
@wdehaes
wdehaes / PrimeIt.rb
Last active September 30, 2016 01:22
PrimeIt is a small command line program written in ruby that uses an improved version of the sieve of Eratosthenes to generate prime numbers based on the user's input, as well as prime factors
#PrimeIt is a command line program that uses an improved version of the sieve of Eratosthenes to generate prime numbers based on the user's input.
puts "Welcome to PrimeIt!"
def main_flow(input = nil)
until input == 0
puts "Pick any integer greater than 4, and the program will PrimeIt if for you. Press 0 to exit."
input = Integer(gets.chop) rescue false
until !!input and (input > 4 or input == 0) do
puts "Oops! I am afraid #{gets.chop} not an input that can be used by PrimeIt. Let's try again."