Skip to content

Instantly share code, notes, and snippets.

View lane-eb's full-sized avatar

Lane Zhang lane-eb

  • East Bay
  • Suzhou
View GitHub Profile
@tgaff
tgaff / mfa authentication.md
Last active November 27, 2023 16:40
mfa authentication in aws

multi-factor authentication for aws cli and eb cli commands

tldr

  1. get YOUR_MFA_SERIAL from IAM web console.
  2. get YOUR_MFA_CODE from your MFA device/app.
  3. aws sts get-session-token --serial-number YOUR_MFA_SERIAL --token-code YOUR_MFA_CODE --duration 129600
  4. Edit `~/.aws/credentials adding or editing an [mfa] section
    [mfa]
    
@a-h
a-h / 01-simple.test.js
Last active December 31, 2023 09:07
Testing styled Material UI components with Enzyme
import React from 'react';
import { shallow } from 'enzyme';
const Item = text => <p>Item {text}</p>;
const Composition = ({ showB }) => (
<p>
<Item text="A" />
{showB && <Item text="B" />}
</p>);
@varyonic
varyonic / Dockerfile
Created June 10, 2016 14:14
Dockerfile with chromedriver
# See https://codeship.com/documentation/docker/browser-testing/
FROM myapp:base
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver
RUN apt-get install -y wget xvfb unzip
# Set up the Chrome PPA
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list