View MUIDataGrid.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentsProps={{ | |
toolbar: { | |
csvOptions: { disableToolbarButton: true }, | |
printOptions: { disableToolbarButton: true }, | |
}, | |
}} |
View reduxNotes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// action type | |
const orderCardType = 'ORDER_CARD'; | |
// action | |
const orderCardAction = () => ({ | |
type: orderCardType, | |
}); | |
// action creator | |
const orderCardActionCreator = () => dispatch => { |
View .zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/paulbrownsmith/.oh-my-zsh" | |
SPACESHIP_PROMPT_ORDER=( | |
battery # Battery level and status | |
dir # Current directory section | |
git # Git section (git_branch + git_status) |
View promises.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hello(resolve) { | |
// do whatever | |
resolve(); | |
} | |
function hello2(resolve) { | |
// do whatever | |
resolve(); | |
} |
View blatdocker.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
View super.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ES6 class constructors MUST call super if they are subclasses. | |
// Thus, you have to call super() if you have a constructor. | |
// A subclass does not have to have a constructor (see #1) | |
// #1 no need to call super() here as there is no constructor | |
class MyClass extends React.Component { | |
render(){ | |
return <div>Hello { this.props.world }</div>; | |
} | |
} |
View amp.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ##### CLASS INHERITANCE: | |
class GuitarAmp { | |
constructor ({ cabinet = 'spruce', distortion = '1', volume = '0' } = {}) { | |
Object.assign(this, { | |
cabinet, distortion, volume | |
}); | |
} | |
} | |
class BassAmp extends GuitarAmp { |
View closure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bookSlotByCustId(customerId) { | |
const custId = customerId | |
return function bookSlot(slotId) { | |
//psuedo code here: | |
dispatch({ | |
apiCall: api.bookSlot(custId, slotId) | |
}); | |
} | |
} |
View sort.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const products = [ | |
{ | |
price: '123', | |
name: 'cproduct1' | |
}, | |
{ | |
price: '50', | |
name: 'bproduct1' | |
}, | |
{ |
View prefs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorTheme": "One Dark+ (Sublime)", | |
"eslint.autoFixOnSave": true, | |
"terminal.integrated.shell.osx": "zsh", | |
"editor.tabSize": 2, | |
} |
NewerOlder