Skip to content

Instantly share code, notes, and snippets.

View toddlemoine's full-sized avatar

Todd Lemoine toddlemoine

View GitHub Profile
@toddlemoine
toddlemoine / jsconfig.json
Created November 18, 2015 17:11
jsconfig
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules",
"dist",
"lib"
]
}
@toddlemoine
toddlemoine / keybindings.json
Created November 18, 2015 17:11
Sublime Text Keybindings for VS Code
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+r",
"command": "workbench.action.gotoSymbol"
},
{
"key": "ctrl+cmd+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus"
var fs = require('fs'),
readline = require('readline'),
glob = require('glob');
var files = glob.sync('something*.*');
files.forEach(function(file) {
fs.readFileSync(file, 'utf8').split('\n').forEach(function(line) {
// Do whatever
});
@toddlemoine
toddlemoine / package.json
Created April 30, 2016 03:02 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@toddlemoine
toddlemoine / index.html
Last active January 30, 2017 17:43 — forked from anonymous/index.html
Merging cells from one table to another JS Bin// source https://jsbin.com/jupaxuruja
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
table {
width: 100%;
border: 1px solid black;
@toddlemoine
toddlemoine / gameOfLife.jsx
Created January 25, 2020 18:36
One take on Conway's Game of Life in JS and React
import React from "react";
import "./styles.css";
function randomState() {
return Math.floor(Math.random() * Math.floor(2));
}
function createCell() {
const alive = randomState();
return { alive };