Skip to content

Instantly share code, notes, and snippets.

View fielding's full-sized avatar
🙊

Fielding Johnston fielding

🙊
View GitHub Profile
/**
*
* Node
*
* @param {*} key
* @param {*} value
* @param {Node} [next=null]
* @param {Node} [prev=null]
*/
function Node(key, value, next = null, prev = null) {

Repo

Haven't decided if I am going to submit code to it yet

Questions

👍 - Unlocked & Done 😊 - Locked & Done 🔒 - Locked & Not Done [] - Not yet Done

@fielding
fielding / Block.js
Last active December 28, 2018 21:19
primitive blockchain implementation in javascript
const sha256 = require("crypto-js/sha256");
function Block(data, parent) {
if ( parent) {
this.index = parent.index + 1;
this.parentHash = parent.hash;
} else {
this.index = 0;
this.parentHash = null;
}
function solve(data) {
// example returns sum of a line of integers seperated by a space
// return data.split(' ').reduce((acc, cur) => acc += Number(cur), 0);
return data;
}
process.stdin.resume();
process.stdin.setEncoding('ascii');
This file has been truncated, but you can view the full file.
[
{
"timestamp": 1556742627000,
"dataType": "activity-hack",
"dataSource": "git@sage:/Users/fielding/etc",
"uuid": "96656ebe-b6d6-531a-9c68-5c92a7ccf50b",
"refs": [
"HEAD",
"master",
"origin/master",
─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿
╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏
<rss
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
version="2.0">
<channel>
{"url":"/fielding","img":"https://avatars0.githubusercontent.com/u/454023?s=460&v=4","uid":454023,"repos":34,"stars":157,"followers":10,"following":15,"pinned":[{"url":"/fielding/dotfiles"},{"url":"/fielding/blox"},{"url":"/fielding/ludum-dare"},{"url":"/fielding/game-of-life"},{"url":"/fielding/minimid"},{"url":"/fielding/trouser-snake"}],"worksfor":"","location":"Fort Smith, Arkansas","fullname":"Fielding Johnston","website":"https://justfielding.com/","avatar":"https://avatars0.githubusercontent.com/u/454023?s=460&v=4","contribs":246,"contrib_matrix":{"2017-02-05":{"fill":"#ebedf0","count":0,"x":"13","y":"0"},"2017-02-06":{"fill":"#ebedf0","count":0,"x":"13","y":"12"},"2017-02-07":{"fill":"#ebedf0","count":0,"x":"13","y":"24"},"2017-02-08":{"fill":"#ebedf0","count":0,"x":"13","y":"36"},"2017-02-09":{"fill":"#ebedf0","count":0,"x":"13","y":"48"},"2017-02-10":{"fill":"#ebedf0","count":0,"x":"13","y":"60"},"2017-02-11":{"fill":"#ebedf0","count":0,"x":"13","y":"72"},"2017-02-12":{"fill":"#ebedf0","count":0,"x"
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
type,public,payload,repo_id,repo_name,repo_url,actor_id,actor_login,actor_gravatar_id,actor_avatar_url,actor_url,org_id,org_login,org_gravatar_id,org_avatar_url,org_url,created_at,id,other
PushEvent,true,"{""push_id"":1959742051,""size"":7,""distinct_size"":7,""ref"":""refs/heads/master"",""head"":""9c6867bc63b01cffb27caef0c87e43e17be608d8"",""before"":""9bf78d9a757b18d81538d149632ee021da267e02"",""commits"":[{""sha"":""865aed2ac2ef9dfb183bef31ae4512a1b0a875eb"",""author"":{""name"":""Fielding Johnston"",""email"":""ce098a871ccf9752ec7315e1698f88873b276b03@justfielding.com""},""message"":""Adjust spacing in .vimrc"",""distinct"":true,""url"":""https://api.github.com/repos/justfielding/dotfiles/commits/865aed2ac2ef9dfb183bef31ae4512a1b0a875eb""},{""sha"":""b3d1026b4cecf055b976a59f25abceaedf8e7c13"",""author"":{""name"":""Fielding Johnston"",""email"":""ce098a871ccf9752ec7315e1698f88873b276b03@justfielding.com""},""message"":""Set wildignore in .vimrc"",""distinct"":true,""url"":""https://api.github.com/repos/j
{"type":"PushEvent","public":"true","payload":"{\"push_id\":1959742051,\"size\":7,\"distinct_size\":7,\"ref\":\"refs/heads/master\",\"head\":\"9c6867bc63b01cffb27caef0c87e43e17be608d8\",\"before\":\"9bf78d9a757b18d81538d149632ee021da267e02\",\"commits\":[{\"sha\":\"865aed2ac2ef9dfb183bef31ae4512a1b0a875eb\",\"author\":{\"name\":\"Fielding Johnston\",\"email\":\"ce098a871ccf9752ec7315e1698f88873b276b03@justfielding.com\"},\"message\":\"Adjust spacing in .vimrc\",\"distinct\":true,\"url\":\"https://api.github.com/repos/justfielding/dotfiles/commits/865aed2ac2ef9dfb183bef31ae4512a1b0a875eb\"},{\"sha\":\"b3d1026b4cecf055b976a59f25abceaedf8e7c13\",\"author\":{\"name\":\"Fielding Johnston\",\"email\":\"ce098a871ccf9752ec7315e1698f88873b276b03@justfielding.com\"},\"message\":\"Set wildignore in .vimrc\",\"distinct\":true,\"url\":\"https://api.github.com/repos/justfielding/dotfiles/commits/b3d1026b4cecf055b976a59f25abceaedf8e7c13\"},{\"sha\":\"ab2116dfd2c7eec14cd5f404ab076ded2058a422\",\"author\":{\"name\":\"Fielding