Skip to content

Instantly share code, notes, and snippets.

View blenderer's full-sized avatar

Eric Harrison blenderer

View GitHub Profile
@blenderer
blenderer / code-challenge.tsx
Created August 3, 2021 19:56
Code challenge, TSX addition
import React from "react";
import Baz from "baz";
interface Props {
baz: boolean;
list: any[];
}
export const Foo = function ({ list: entries, list = "" }: Props) {
const items = (list) => {
@blenderer
blenderer / HelloWorld.js
Created May 16, 2018 04:50
NodeCGReplicant React Component
import React, { Component } from 'react';
import NodeCGReplicant from './NodeCGReplicant';
class HelloWorld extends Component {
state = {
hello: 'world'
};
render() {
describe('Context async', function () {
before(function (done) {
setTimeout(function(){
this.name = "Eric";
done();
}, 1700)
});
it('should work', function () {
this.should.have.property('name');
});
exports.shouldBehaveLikeAUser = function(){
it('should have .name.first', function(){
this.user.name.first.should.equal('tobi');
})
it('should have .name.last', function(){
this.user.name.last.should.equal('holowaychuk');
})
describe('.fullname()', function(){
@blenderer
blenderer / build.settings
Created August 12, 2014 04:30
Touch/Collision Demo Corona SDK
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
settings = {
orientation = {
default = "portrait",
supported = { "portrait", }
},
@blenderer
blenderer / gist:c2411af452b0cbfe5bfb
Created June 17, 2014 04:16
Talking Point URLs
https://gist.github.com/blenderer/39385d667a602177d852
http://en.wikipedia.org/wiki/Model_View_ViewModel#mediaviewer/File:MVVMPattern.png
http://jsfiddle.net/rniemeyer/aDahT/
http://lodash.com/
http://requirejs.org/
http://knockoutjs.com/
@blenderer
blenderer / DungeonGeneratorLove2d
Created July 10, 2013 16:30
Just some scratch files of a Random Dungeon Generator (Binding of Isaac) Style
require('middleclass')
function love.load()
window_width = love.graphics.getWidth()
window_height = love.graphics.getHeight()
room_width = 64
room_height = 48
the_floor = Floor:new(room_width, room_height, 50, window_width / 2 - room_width / 2, window_height / 2 - room_height / 2)
@blenderer
blenderer / GWR Dungeon Scratch
Last active December 19, 2015 13:08
Procedural Dungeon Generation
1. Place room number 1
2. randomly choose a side on a random room, continue if not occupied or room won't be surrounded
3. place room there, make room1.(side) = new room.
4. Go back to 2
- Repeat step 3 until n is fullfilled.
Let's put this in the wild!
@blenderer
blenderer / shuriken
Created June 24, 2013 22:16
Shuriken jQuery simple slider plugin- will turn into a full plugin later
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shuriken</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script>
(function($) {
@blenderer
blenderer / gist:5832761
Last active December 18, 2015 19:28
Replace spaces with dashes and make undercase. Copies to clipboard in Chrome/FF
copy("the_title".replace(/ /g, "-").toLowerCase());