Skip to content

Instantly share code, notes, and snippets.

@reesscot
reesscot / Example Amplify Android config file
Last active May 3, 2023 18:55
amplifyconfiguration.json
{
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "us-east-1:*************",
"Region": "us-east-1"
}
@reesscot
reesscot / amplify-init.sh
Created May 19, 2022 22:43 — forked from josefaidt/amplify-init.sh
Minimal Amplify CLI headless init script
#!/bin/bash
set -e
IFS='|'
AMPLIFY_ENVIRONMENT='dev'
AWS_REGION='us-east-1'
AWSCLOUDFORMATIONCONFIG="{\
\"configLevel\":\"project\",\
\"useProfile\":true,\
@reesscot
reesscot / .zshrc
Created January 29, 2019 21:40
ZSH Git Aliases
# GIT Aliases
alias gs='git status '
alias gpu='git push all '
alias gps='git push all '
alias gpl='git pull all '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
const assert = require('assert');
function isAnagram(word1, word2) {
return word1.toLowerCase().replace(' ', "").split("").sort().join("") ===
word2.toLowerCase().replace(' ', "").split("").sort().join("");
}
function isPalindrome(word) {
if (word.length % 2 === 0) {
//even length word
@reesscot
reesscot / JS-Interview-Question.html
Last active May 22, 2019 19:55
JS Interview Question
<html>
<body>
<p>Question: when clicking on each input field below, what will be outputted to the console?</p>
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<script>
var elements = document.getElementsByTagName("input");
var n = elements.length;
@reesscot
reesscot / interview-react-app.js
Created March 21, 2018 18:01
Interview Question - Broken React App
/**
* Interview Example for React JS
* Question: Find three errors in the following React Component.
*
*/
import React, { Component } from "react";
import { render } from "react-dom";
class App extends Component {
constructor(props) {
@reesscot
reesscot / aligning-images.md
Created November 22, 2017 19:57 — forked from DavidWells/aligning-images.md
Guide to aligning images in github readme.md files

Aligning images

left alignment

This is the code you need to align images to the left:

@reesscot
reesscot / basic-webpack-config.js
Last active June 7, 2017 17:25
A basic ES2015 Webpack Configuration with Uglification
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
entry: './src/main.js',
output: {
path: './dist/',
filename: 'bundle.js'
},
module: {
@reesscot
reesscot / package.json
Created February 21, 2017 20:33
Simple NPM script to compile and host JS project using Babel ES2015
{
"name": "Simple_ES6_Babel_Project",
"version": "1.0.0",
"description": "Build template to watch, compile, and serve a ES2015 JS project.",
"main": "index.html",
"scripts": {
"dev": "http-server | npm run compile-js",
"compile-js": "babel ./public/js/app.js --watch --out-file ./public/js/app_compiled.js --presets=es2015"
},
"author": "Scott Rees",
@reesscot
reesscot / package.json
Last active January 12, 2017 21:53
Simple npm scripts setup for compiling less, autoprefixing, and minifying CSS.
{
"name": "my-npm-project",
"version": "0.0.1",
"description": "My project description",
"watch": {
"dist-css": {
"patterns": [
"./"
],
"extensions": "less",