Skip to content

Instantly share code, notes, and snippets.

View russellf9's full-sized avatar
🏠
Working from home

Russell Wenban russellf9

🏠
Working from home
  • Factornine Limited
  • London, UK
View GitHub Profile
@russellf9
russellf9 / mysql-setup-mac-with-sequel-pro.md
Created July 9, 2021 13:57 — forked from joeyklee/mysql-setup-mac-with-sequel-pro.md
Setting up mysql on mac with sequel pro and homebrew

Setup instructions

Setting up mysql on mac with sequel pro and homebrew

MacOS high sierra 10.13.6
Homebrew version 1.7.6

Assuming you've installed homebrew...

inOrderDFS(){
// a variable to store the visited nodes
let result = []
// helper function -- accepts a node
function traverse(node){
// if node has left, recursion to find the leftest leaf node
if(node.left) traverse(node.left)
// push the node to the result
result.push(node)
// if node has right, recurstion to find the rightest leaf node
@russellf9
russellf9 / redux-thunk-examples.js
Created November 18, 2021 11:40 — forked from markerikson/redux-thunk-examples.js
Redux-Thunk examples
// The classic AJAX call - dispatch before the request, and after it comes back
function myThunkActionCreator(someValue) {
return (dispatch, getState) => {
dispatch({type : "REQUEST_STARTED"});
myAjaxLib.post("/someEndpoint", {data : someValue})
.then(
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}),
error => dispatch({type : "REQUEST_FAILED", error : error})
);
@russellf9
russellf9 / free-database-hosting.md
Created January 18, 2023 15:10 — forked from bmaupin/free-database-hosting.md
Free database hosting