Skip to content

Instantly share code, notes, and snippets.

View skellertor's full-sized avatar
☠️
Nerd

Samuela Keller skellertor

☠️
Nerd
View GitHub Profile
@skellertor
skellertor / getSession.js
Created May 2, 2019 15:54
Get a session with idToken, accessToken, and refreshToken from cognito
const sessionData = {
IdToken: new cognito.CognitoIdToken({ IdToken: idToken }),
AccessToken: new cognito.CognitoAccessToken({ AccessToken: accessToken }),
RefreshToken: new cognito.CognitoRefreshToken({ RefreshToken: refreshToken })
};
const currentSession = new cognito.CognitoUserSession(sessionData);
@skellertor
skellertor / gist:0a37f5dc54c67ad20b5d60f21a748fec
Created March 26, 2019 18:54
Accidental commit to develop
git reset --soft HEAD~1
@skellertor
skellertor / git diff file
Last active March 26, 2019 19:15
use git to diff files not in source control
git diff --color-words --no-index file1.txt file2.txt
@skellertor
skellertor / git_tag
Created November 30, 2018 22:42
Moving a tag with git
git log
git tag -a -f v1.0 <new-commit-hash>
git push --tags --force
@skellertor
skellertor / s3 hack
Created September 15, 2018 17:20
s3 static hosting redirect all requests to index.html
Create S3 bucket, for example: react
Create CloudFront distributions with these settings:
Default Root Object: index.html
Origin Domain Name: S3 bucket domain, for example: react.s3.amazonaws.com
Go to Error Pages tab, click on Create Custom Error Response:
HTTP Error Code: 403: Forbidden (404: Not Found, in case of S3 Static Website)
Customize Error Response: Yes
Response Page Path: /index.html
HTTP Response Code: 200: OK
Click on Create
@skellertor
skellertor / dedupe.md
Created July 27, 2018 06:42
dedupe an array
[1,1,4,3,6,6,7].filter((number, index, arr) => arr.indexOf(number) === index)

material_ui

font: fira code enable font ligatures

Interview questions:

General

  • Tell us a little bit about yourself.
  • What are some things you like to do in your free time?
  • Tell us about some of the things you have built, whether personally or professionally? What tools, frameworks, databases, languages did you use?
  • Do you follow an blogs or news sites? Which ones?
  • What is the latest thing you learned?
  • What do you want to learn next?

Javascript

  • What is the difference between var, let, and const?
@skellertor
skellertor / mac_setup.md
Last active June 5, 2018 04:35
Setting up mac for Node.js Development
  1. install nvm
  2. install homebrew and launchrocket
  3. install webstorm, vscode, and atom
  4. install atlassian sourcetree
  5. install hyper and iterm
  6. install postman
  7. install sequel pro

.bash_profile

cmd + shift + . to show hidden files