Skip to content

Instantly share code, notes, and snippets.

View jamesattard's full-sized avatar

James A. jamesattard

View GitHub Profile
# Functions
function enc() { gpg --output $1.e --encrypt --recipient info@jamesattard.com $1; }
function dec() { gpg --output $1 --decrypt $1.e; }
<html lang="en">
<body><noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="text/javascript" src="http://localhost/main.c9cd54b9.chunk.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="logo192.png" />
<html>
Hello World
</html>
@jamesattard
jamesattard / cra.sh
Created August 14, 2019 07:29
create-react-app
$ create-react-app hello-react
# Remove foreman
yum remove foreman foreman-installer foreman-proxy
rm -rf /var/lib/foreman /usr/share/foreman /usr/share/foreman-proxy/logs
# Remove puppet
yum remove puppet puppetmaster puppet-common puppetmaster-common puppetlabs-release
rm -rf /usr/lib/ruby/vendor_ruby/puppet /usr/share/puppet /var/lib/puppet /etc/puppet
@jamesattard
jamesattard / Dockerfile
Last active June 10, 2019 06:23
Docker Intro Session Exercise #2
FROM mcr.microsoft.com/powershell:6.2.1-nanoserver-1803
COPY HelloWorld.ps1 /
CMD ["pwsh", "HelloWorld.ps1"]
@jamesattard
jamesattard / docker-intro-session-ex-1.ps1
Last active April 16, 2023 04:08
Docker Intro Session Exercise #1
# In this exercise we are going through the Docker fundamental commands.
# After completing this lab, you are expected to know how to:
#
# a. find Docker images
# b. run containers
# c. stop containers
# d. delete containers
#
# Docker Intro Session Lab - James Attard (2019)
@jamesattard
jamesattard / noteReducer.js
Created September 1, 2018 07:17
Reducer Architecture
import {
FETCHING_NOTES,
FETCH_NOTES,
FETCH_NEW_NOTE,
FETCH_UPDATED_NOTE,
FETCH_CLOSED_NOTE
} from "../actions/types";
const initialState = {
list: [],
@jamesattard
jamesattard / setstate_async.js
Created July 18, 2018 06:38
Asynchronous setState()
setCoords = coords => {
this.setState({
lat: coords.lat,
lng: coords.lng
});
};
componentDidMount() {
let geocoder = new window.google.maps.Geocoder();
geocoder.geocode(