Skip to content

Instantly share code, notes, and snippets.

View StevenMDixon's full-sized avatar
🌲
いつもの通りに森に

Steven M. Dixon StevenMDixon

🌲
いつもの通りに森に
  • Rev.io
  • United States
View GitHub Profile
@StevenMDixon
StevenMDixon / gist:3de86ac058a6c96b6cd3a7ca1485ec4b
Created August 3, 2019 15:46 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@StevenMDixon
StevenMDixon / index.js
Last active July 8, 2019 18:02
Creating an MVC that works
function Observer(modelUpdate, veiwUpdate) {
this.subscribers = [];
this.subscribe = function(model, view) {
let id = this.subscribers.length;
let newModel = new model(modelUpdate.bind(this, id));
let newView = new view(veiwUpdate.bind(this, id));
this.subscribers.push({
model: newModel,
view: newView
});

More on State

state machines = automata that take a finite number of inputs and output a finite amount of output.

derived state: selectors = functions that receive state as a paramater and make a determination based on that state.

function isOld(state){return state.age > 50}
Player:
You are a malicous hacker, You trade in one thing and one thing only, Data. Doesn't matter where you get it from Data is Data. But beware
You're always being watched and the government is good at shutting you down. Cleverly hack your way through this face paced game while big
brother is close behind.
Objective:
Gather resources use those resources to Develop things that will help take over the net.
Challenges:
# 2019 Project Ideas List
This is a List of Projects that I would like to do this year.
- [ ] Revamp Portfolio website
- [ ] Crafting game?
- ...
# 2019 Learning Checklist
This is a list of subjects I would like to learn in 2019.
- Hosting & CMS
- [ ] Netlify & Netlify CMS
- Server Side Rendering
- [ ] [Next.js](https://nextjs.org/)
const s = (a, c={}, d=e=>e)=>(({...c}[a] || d(a)));
we start with two alike arrays that need to be combined, the output should combine items that are exactly the same.
let array_one = [{name: "cats", count: 1},{name: "dogs", count: 2}];
let array_two = [{name: "cats", count: 5}, ,{name: "chickesn", count: 4}];
// expected output [{name: "cats", count: 6},{name: "dogs", count: 2} ,{name: "chickesn", count: 4}}]
store = Redux.createStore(reducer, initialstate, enhancer);
manages what the state lookslike. centralized location for state.
function rootReducer(state= initialState, action){
return state
}
var initialState = {
count: 0

Redux

State management.

Models applications state as a single JS object

npm install --save redux

Action