Skip to content

Instantly share code, notes, and snippets.

View cornedor's full-sized avatar
🚀
gotta go fast

Corné Dorrestijn cornedor

🚀
gotta go fast
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cornedor on github.
  • I am cornedor (https://keybase.io/cornedor) on keybase.
  • I have a public key ASBqa5vQ9TJ8lWCw7pd58b39zgI36fq1FH-8n7wpuuE58Qo

To claim this, I am signing this object:

@cornedor
cornedor / IntCode.re
Created December 3, 2019 07:36
Advent of Code 2019
let template = [
3,
1,
1,
2,
3,
1,
3,
4,
3,
@cornedor
cornedor / index.html
Last active November 19, 2019 13:14
Retina image
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
</head>
<body>
<img src="https://via.placeholder.com/200x100" srcset="https://via.placeholder.com/800x400 4x" />
</body>
</html
@cornedor
cornedor / index.html
Created June 2, 2015 10:10
Simple React+Material UI example
<!doctype html>
<html>
<title>Minimal React/Material test</title>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,500' rel='stylesheet' type='text/css'>
<div id="holder"></div>
<script src="bundle.js"></script>
</html>
@cornedor
cornedor / test_mocha.opts
Last active April 13, 2016 18:51 — forked from jmreidy/test_mocha.opts
Unit test React Native with Mocha
--compilers js:./test/support/compiler
--require ./test/support/init
@cornedor
cornedor / TextInput.js
Last active February 19, 2016 10:24
Wrapper around React Native's TextInput to make getting the text easier.
import React, {
Component,
PropTypes,
TextInput as NativeTextInput
} from 'react-native';
/**
* Wrapper for the native TextInput which adds getValue()
**/
class TextInput extends Component {
set nocompatible
" Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'Valloric/YouCompleteMe'

In Minecraft 1.6.4 the following check is made:

if (this.worldObj.canLightningStrikeAt(this.posX, this.posY + 1, this.posZ))

This will check if rain can reach the block AND if it is raining. If that is true the possibility to catch a fish goes up from 1 in 500 to 1 in 300

From EntityFishHook.java:

@cornedor
cornedor / stylereloader.js
Last active December 29, 2015 15:19
Gets Last-Modified header from server and if changed reloads the style sheet.
(function(timeout, urls) {
var times = {};
setInterval(function() {
for(var i = 0; i < urls.length; i++) {
var x = new XMLHttpRequest(),
url = urls[i];
x.url = url;
x.open('HEAD', url + (url.indexOf("?") === -1 ? "?v=" : "&v=") + Date.now(), true);
x.onreadystatechange = function(e) {
var x = e.target;
@cornedor
cornedor / database.js
Last active December 25, 2015 00:09
A localStorage database-ish system written in JS
var database = (function () {
'use strict';
var tables = [],
dataCache = {},
toSync = 0,
DEBUG = true;
function log(t) {
if(DEBUG) {
console.log("%c" + t, "color: #090; font-weight: bold;");
}