Skip to content

Instantly share code, notes, and snippets.

View kosaikham's full-sized avatar

sai lao kham kosaikham

View GitHub Profile
@kosaikham
kosaikham / README.md
Created July 30, 2019 06:43 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@kosaikham
kosaikham / jwt-expiration.md
Created June 6, 2019 03:03 — forked from soulmachine/jwt-expiration.md
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC:

@kosaikham
kosaikham / project-ideas01.md
Created January 30, 2019 09:45 — forked from MWins/project-ideas01.md
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@kosaikham
kosaikham / README-Template.md
Created January 25, 2019 03:35 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@kosaikham
kosaikham / react-lifecycle-cheatsheet.md
Created December 9, 2018 21:08 — forked from bvaughn/react-lifecycle-cheatsheet.md
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount Constructor equivalent for createClass
render Create and return element(s)
componentDidMount DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps Update state based on changed props

@kangax's ES6 quiz, explained

@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).

Here we go with the explanations:

Question 1:
(function(x, f = () => x) {
@kosaikham
kosaikham / Podcasts2018.md
Created November 21, 2018 03:29 — forked from adamayd/Podcasts2018.md
Web Development Podcasts for Beginners in 2018

Web Development Podcasts for Beginners in 2018

Commuting to work from east of Baltimore to Washington DC leaves a lot of time in the car. While driving to work one day early in my web development career, I wondered if there is such a thing as a web development podcast. How would you pull off live coding on a “radio” podcast. Well, you don’t. Well, sometimes they do, but the moral of the story is that I was shocked to find that not only are there web development podcasts, there are a lot of them and really good ones to boot. These podcasts have become staples to my learning and I recommend them to everyone who is just starting out. While there are plenty to listen to, I recommend starting with these. You’ll have plenty of time later to load up deep dives into the V8 JavaScript engine later.

Technology Podcasts

These podcasts are focused more on the technologies used in web development and their use cases.

Syntax - The new kid on the block and by far my favorite right now. Syn

@kosaikham
kosaikham / Google Map Marker LatLong
Created August 17, 2018 04:15 — forked from woodwardtw/Google Map Marker LatLong
A draggable Google Map marker that auto locates and updates on maker drag
<!DOCTYPE html>
<html>
<head>
<title>Geolocation</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0px;
@kosaikham
kosaikham / async-await.js
Created July 20, 2018 08:35 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}