Skip to content

Instantly share code, notes, and snippets.

View leeliwei930's full-sized avatar

Lee Li Wei leeliwei930

  • Johor Bahru, Johor, Malaysia
View GitHub Profile
@leeliwei930
leeliwei930 / Dockerfile
Last active August 16, 2021 05:03
Docker containers network setup on Laravel Sail with Nginx Proxy manager and NodeJS frontend webserver container.
# This docker file is use to construct NodeJS image for NuxtJS development environment
FROM node:lts-alpine
LABEL maintainer="your-email@mail.com"
RUN mkdir -p /usr/src/nuxt-project
WORKDIR /usr/src/nuxt-project
@leeliwei930
leeliwei930 / centre.json
Last active June 13, 2021 05:09
VaccineMY101-API-behind-the-scene
[
{
"st": "Johor",
"dist": "Kota Tinggi",
"ppvc": "KK Bandar Penawar",
"cd": "johor",
"lat": "1.55332",
"lon": "104.23373",
"linky": ""
},
@leeliwei930
leeliwei930 / three_number_sum.go
Last active May 25, 2021 07:54
Algoexpert Solutions
package main
// [12, 3, 1]
// array distinct, solutions 3 numbers group must be unique
// [3,1,2]
// [1,2,-6]
import ("fmt"
"sort")
func ThreeNumberSum(array []int, target int) [][]int {
solutions := make([][]int,0)
@leeliwei930
leeliwei930 / .env.singpass-env
Last active July 5, 2022 11:07
Singpass With Laravel Medium Embed
SINGPASS_CLIENT_ID="<given-by-singpass-authority>"
SINGPASS_REDIRECT_URI="<your-callback-url-that-must-be-same-as-you-provided-for-onboarding>"
SINGPASS_SIGNING_KEY="storage/singpass/singpass-signing-key-encrypted.pem"
SINGPASS_VERIFICATION_KEY="storage/singpass/singpass-verification-key.pem"
SINGPASS_ENCRYPTION_KEY="/storage/singpass/singpass-encryption-key.pem"
SINGPASS_DECRYPTION_KEY="/storage/singpass/singpass-decryption-key-encrypted.pem"
SINGPASS_WELL_KNOWN_CONFIGURATION_URL="https://stg-id.singpass.gov.sg/.well-known/openid-configuration"
SINGPASS_DECRYPTION_KEY_PASSPHRASE="<your-singpass-decryption-key-passphrase>"
SINGPASS_SIGNING_KEY_PASSPHRASE="<your-singpass-signing-key-passphrase>"
@leeliwei930
leeliwei930 / mutation.graphql
Created April 1, 2021 04:53
GraphQL Mutation Example
mutation {
addBooksToFavorite(bookID: "1"){
name
isbn
authors {
name
}
}
}
@leeliwei930
leeliwei930 / response-skeleton.graphql
Last active April 1, 2021 04:30
A Skeleton of the response body
query {
fetchBooks(orderBy: "id" , sort: "asc") {
id
title
isbn
authors {
name
}
}
}
@leeliwei930
leeliwei930 / response.json
Created April 1, 2021 04:21
GraphQL Basic and Laravel Integration Part 1 - Understanding GraphQL
// https://api.tedious.dev/api/books?fields=id,title,isbn&includes=authors.name&order_by=id&sort=asc
{
"data" : [
{
"id" : "1",
"title" : "Steve Jobs",
"isbn" : "xxxxxx",
"authors" : [{
"name" : "Walter Issacons"
@leeliwei930
leeliwei930 / User.php
Last active March 2, 2021 10:10
Override Laravel Verification Email
<?php
use App\Notifications\VerifyEmail;
public function sendEmailVerificationNotification()
{
$this->notify(new VerifyEmail($this->email));
}
@leeliwei930
leeliwei930 / .eslintignore
Last active September 30, 2020 14:45
Vue 3 - My TypeScript Development Environment Setup
.eslintrc.js
*.config.js
*.config.ts