Skip to content

Instantly share code, notes, and snippets.

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

Eddy Hernandez eddywashere

🔥
loading...
View GitHub Profile
@eddywashere
eddywashere / cloudwatchlogs.js
Created May 1, 2017 17:03
get cloudwatch logs
const _ = require('lodash');
const AWS = require('aws-sdk');
const retry = require('bluebird-retry');
function recursiveReq(request, params, key, items = [], count = 0) {
return request(params).then(data => {
const newItems = items.concat(data[key]);
const lastItem = _.last(newItems);
const nextToken = _.get(data, 'nextToken', null);

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 / App.js
Last active February 20, 2020 10:15 — forked from gaearon/App.js
Reactstrap App.js Example for create-react-app
import React, { Component } from 'react';
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
Container,

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 / app.jsx
Created February 7, 2016 05:26
higher order layout component example in React
import React from 'react';
import { render } from 'react-dom';
import {PageContent, PageSidebar} from './Content';
import Layout from './Layout';
const Example = Layout({Content: PageContent, Sidebar: PageSidebar});
render(Example, document.getElementById('app'))
@eddywashere
eddywashere / data-
Created February 3, 2016 18:34
ublock origin's base64 encoded google analytics replacement scripts
Request URL:data:application/javascript;base64,
KGZ1bmN0aW9uKCkgewoJLy8gaHR0cHM6Ly9kZXZlbG9wZXJzLmdvb2dsZS5jb20vYW5hbHl0aWNzL2Rldmd1aWRlcy9jb2xsZWN0aW9uL2FuYWx5dGljc2pzLwoJdmFyIG5vb3BmbiA9IGZ1bmN0aW9uKCkgewoJCTsKCX07Cgl2YXIgbm9vcG51bGxmbiA9IGZ1bmN0aW9uKCkgewoJCXJldHVybiBudWxsOwoJfTsKCS8vCgl2YXIgVHJhY2tlciA9IGZ1bmN0aW9uKCkgewoJCTsKCX07Cgl2YXIgcCA9IFRyYWNrZXIucHJvdG90eXBlOwoJcC5nZXQgPSBub29wZm47CglwLnNldCA9IG5vb3BmbjsKCXAuc2VuZCA9IG5vb3BmbjsKCS8vCgl2YXIgZ2FOYW1lID0gd2luZG93Lkdvb2dsZUFuYWx5dGljc09iamVjdCB8fCAnZ2EnOwoJdmFyIGdhID0gZnVuY3Rpb24oKSB7CgkJdmFyIGxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7CgkJaWYgKCBsZW4gPT09IDAgKSB7CgkJCXJldHVybjsKCQl9CgkJdmFyIGYgPSBhcmd1bWVudHNbbGVuLTFdOwoJCWlmICggdHlwZW9mIGYgIT09ICdvYmplY3QnIHx8IGYgPT09IG51bGwgfHwgdHlwZW9mIGYuaGl0Q2FsbGJhY2sgIT09ICdmdW5jdGlvbicgKSB7CgkJCXJldHVybjsKCQl9CgkJdHJ5IHsKCQkJZi5oaXRDYWxsYmFjaygpOwoJCX0gY2F0Y2ggKGV4KSB7CgkJfQoJfTsKCWdhLmNyZWF0ZSA9IGZ1bmN0aW9uKCkgewoJCXJldHVybiBuZXcgVHJhY2tlcigpOwoJfTsKCWdhLmdldEJ5TmFtZSA9IG5vb3BudWxsZm47CglnYS5nZXRBbGwgPSBmdW5jdGlvbigpIHsK
@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
module.exports = {
'plugins': [
'react'
],
'ecmaFeatures': {
'jsx': true
},
'env': {
'browser': true,
'node': true,

Keybase proof

I hereby claim:

  • I am eddywashere on github.
  • I am eddywashere (https://keybase.io/eddywashere) on keybase.
  • I have a public key whose fingerprint is E3A1 3169 9CFE ED81 7DD1 A11A 7C57 AE5F 3EC5 FE34

To claim this, I am signing this object: