Skip to content

Instantly share code, notes, and snippets.

View eddywashere's full-sized avatar
🔥
loading...

Eddy Hernandez eddywashere

🔥
loading...
View GitHub Profile

cognito setup for a decent user experience

This brain dump assumes a frontend js app + backend api are involved. I'll hopefully turn this into a lambda + react blog post.

To setup Cognito User Pools in a way that

  • allows users to change their email address
  • does not let users overwrite admin values
  • fully customizable verification emails
@eddywashere
eddywashere / pre-commit
Last active March 25, 2017 00:38
Git hook that prevents commits to master
#!/bin/sh
#
# Git hook that prevents commits to master
# use --no-verify to bypass this hook
# ex: git commit -m "init commit" --no-verify
branch=`git symbolic-ref HEAD`
if [ "$branch" = "refs/heads/master" ]; then
echo "Direct commits to the branch master are not allowed"
exit 1
module.exports = {
'plugins': [
'react'
],
'ecmaFeatures': {
'jsx': true
},
'env': {
'browser': true,
'node': true,

Depends on Stylish Chrome Extension

Stylish Config

CSS override:

.cwdb-log-viewer .cwdb-log-viewer-table-row-details .content {
  background: #333;
 color: #f1f1f1;
@eddywashere
eddywashere / Asana.md
Created September 3, 2016 03:50
Asana onboarding
@eddywashere
eddywashere / mongoose-schematypes.js
Created September 6, 2013 23:02
mongoose schematypes
var schema = new Schema({
name: String,
binary: Buffer,
living: Boolean,
updated: { type: Date, default: Date.now }
age: { type: Number, min: 18, max: 65 }
mixed: Schema.Types.Mixed,
_someId: Schema.Types.ObjectId,
array: [],
ofString: [String],
@eddywashere
eddywashere / bash.sh
Created January 25, 2016 19:07
conditional docker-machine eval
# assumes your docker-machine is called "dev"
docker_running=$(docker-machine ls | grep dev)
if [[ "$docker_running" == *"Stopped"* ]]
then
echo "fyi - docker not running"
elif [[ "$docker_running" == *"Running"* ]]
then
eval "$(docker-machine env dev)"
fi
@eddywashere
eddywashere / .gitignore
Created January 7, 2014 18:52
global .gitignore file
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
/db/*.sqlite3
/log/*.log
@eddywashere
eddywashere / gist:7575099
Created November 21, 2013 02:25
js snippet for outputting stylesheets, rule count and selector count
var
styleSheets = document.styleSheets,
totalStyleSheets = styleSheets.length;
for (var j = 0; j < totalStyleSheets; j++){
var
styleSheet = styleSheets[j],
rules = styleSheet.cssRules,
totalRulesInStylesheet = rules.length,
totalSelectorsInStylesheet = 0;
@eddywashere
eddywashere / frontend.md
Last active December 24, 2015 06:49
My resources for keeping up with frontend design and web development