Skip to content

Instantly share code, notes, and snippets.

gotta go fast

Corné Dorrestijn cornedor

gotta go fast
View GitHub Profile
cornedor /
Created Dec 3, 2019
Advent of Code 2019
let template = [
cornedor / index.html
Last active Nov 19, 2019
Retina image
View index.html
<!doctype html>
<html lang="">
<meta charset="utf-8">
<img src="" srcset=" 4x" />

Keybase proof

I hereby claim:

  • I am cornedor on github.
  • I am cornedor ( on keybase.
  • I have a public key ASBqa5vQ9TJ8lWCw7pd58b39zgI36fq1FH-8n7wpuuE58Qo

To claim this, I am signing this object:

cornedor / test_mocha.opts
Last active Apr 13, 2016 — forked from jmreidy/test_mocha.opts
Unit test React Native with Mocha
View test_mocha.opts
--compilers js:./test/support/compiler
--require ./test/support/init
cornedor / TextInput.js
Last active Feb 19, 2016
Wrapper around React Native's TextInput to make getting the text easier.
View TextInput.js
import React, {
TextInput as NativeTextInput
} from 'react-native';
* Wrapper for the native TextInput which adds getValue()
class TextInput extends Component {
View .vimrc
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'
cornedor / index.html
Created Jun 2, 2015
Simple React+Material UI example
View index.html
<!doctype html>
<title>Minimal React/Material test</title>
<link href=',300,500' rel='stylesheet' type='text/css'>
<div id="holder"></div>
<script src="bundle.js"></script>
cornedor /
Last active Aug 29, 2015
Using "-->" as a single line comment.

Using "-->" as a single line comment.

Typing --> on the beginning of a line of code in JavaScript seems to comment it. But looks like there isn't almost no info available about this.

What i found so far is a v8 (test)[] that does test for this feature. So it looks like it is done intentionally.

Looks like v8 and Firefox's JS engine do both parse this correctly. MuJS does throw an syntax error

SyntaxError: test.js:2: unexpected token in expression: '>'

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


cornedor / stylereloader.js
Last active Dec 29, 2015
Gets Last-Modified header from server and if changed reloads the style sheet.
View stylereloader.js
(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;'HEAD', url + (url.indexOf("?") === -1 ? "?v=" : "&v=") +, true);
x.onreadystatechange = function(e) {
var x =;