Skip to content

Instantly share code, notes, and snippets.

@jmoore53
jmoore53 / mocha-webpack.md
Last active July 22, 2019 02:37
Configuring Mocha-Webpack, React, Rails, Webpack

Configuring Mocha-Webpack, React, Rails, Webpack

React based application and the error was related to the loader and the ability to compile code...

After some digging I used the mocha-webpack flag --webpack-config and pointed it to my webpack config file and got everything working.

  "scripts": {
    "test": "./node_modules/mocha-webpack/bin/mocha-webpack --webpack-config ./config/webpack/test.js ./app/javascript/packs/setupTests.js ./app/javascript/packs/test"
 }
@jmoore53
jmoore53 / PassingState.jsx
Last active June 14, 2019 02:10
Example of passing state among multiple components.
class Parent extends Component {
constructor(props){
super(props);
this.state = {passedValue: this.props.passedFromStaticView};
this.handleParentStateUpdate = this.handleParentStateUpdate.bind(this);
}
// This method is passed as a prop to the child component
handleParentStateUpdate(e){
console.log("handle state update for the parent!")
// Sets the state of this class's passedValue variable
@jmoore53
jmoore53 / Qemu Installation No Admin.md
Created May 30, 2019 15:29
A workaround to installing a Virtual Machine on a host without Admin Rights
@jmoore53
jmoore53 / Immutable.md
Created February 12, 2019 05:09
Immutable Infrastructure and Docker Images

Building Immutable Application Infrastructure for Patching and Code Releases

Normally in a 3-tier architecture the application layer is exposed to external threats and exposed to the entire world. Using an auto-update server deploy and the tools currently available, it is possible to auto patch secure servers with 0 downtime.

Base Level (Virtual Machines)

Write a script to check Amazon Linux security page for critical patches. When the script encounters a Critical CVE, take the most recent image with the patch already included and deploy this base image.

@jmoore53
jmoore53 / Raspberry Pi.md
Last active June 5, 2017 23:54
Raspberry Pi Quick Reference

Raspberry Pi Quick

/etc/wpa_supplicant/wpa_suppolicant.conf is used to set the network settings. Example File

/etc/rc.local file for all startup scripts

@jmoore53
jmoore53 / Ubuntu Rails Server.md
Last active March 9, 2017 06:18
Setting up a Rails Server on an Ubuntu 16.0.4

This is reference guide for me to refer back to when I need to install a true rails production server on a real server.

For now I am using an Ubuntu Virtual Machine General Setup Guide


On local machine run ssh-keygen, if the file already exists, do not over write it.

If you need to copy an ssh key to an existing server, use ssh-copy-id username@remote_host

@jmoore53
jmoore53 / VirtualBox CentOS httpd.md
Last active October 21, 2016 05:35
httpd things to look out for (VirtualBox CentOS)

##httpd possible errors (VirtualBox CentOS7) ####While trying to figure out why my CentOS virtual machine wasn't working, I started to become frustrated with why my HTTP server (httpd service). Obviously my fault and not the computers (firewall was blocking an incoming connection on the Virtual Machine). Things to look out for when trying to connect to Virtual Machine Server:

Terminology Acronyms: Virtual Machine - VM

###Things to check:

####Is there a outward connection avaliable on the Virtual Machine to the outside world?

  • ping 8.8.8.8
@jmoore53
jmoore53 / VirtualBox Shared Filesystem Resources.markdown
Last active October 21, 2016 05:35
Shared Filesystem Resources (VirtualBox CentOS)