Skip to content

Instantly share code, notes, and snippets.

View DaddyMoe's full-sized avatar

Moses Mansaray DaddyMoe

View GitHub Profile
@DaddyMoe
DaddyMoe / react_state_component_reuse.jsx
Created January 10, 2020 22:32
React state management and Components reusing
// Use https://jscomplete.com/playground/rgs to play with this
function Button(props) {
const handleClick = () => props.myOnClickFunction(props.increment);
return (
<button onClick={onButtonClick}>
+{props.increment}
</button>
);
}
@DaddyMoe
DaddyMoe / DailyDockerCommands.md
Last active December 21, 2020 13:36
Daily Docker Commands

Daily Docker Commands

Building custom containers

// Build from a `Dockerfile` in this directory `.` and tag the container as `getting-started`
docker build -t getting-started .

//Run container in the background `-d` with ports `-p` and tag = `getting-started`
docker run -dp 3000:3000 getting-started
@DaddyMoe
DaddyMoe / LinuxDevelopmentEnvironmentSetup.md
Last active December 31, 2020 14:41
Linux Development Environment Setup for Java and React/JS Engineering

Linux development Environment setup

Install SDKs, e.g. java via SDKMan

You may also need development tools to build native addons:

sudo apt-get install gcc g++ make

@DaddyMoe
DaddyMoe / Default (OSX).sublime-keymap
Created January 20, 2021 15:58
IntelliJ Idea unix based key mappings for SublimeText. For those, like me, with muscle memory bonded to IntelliJ shortcuts
// Open Sublime. The Preference-> key bindings. Apply all or selected few from the following.
[
{ "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+d"], "command": "duplicate_line" },
{ "keys": ["shift+alt+up"], "command": "swap_line_up" },
{ "keys": ["shift+alt+down"], "command": "swap_line_down" }
]