Skip to content

Instantly share code, notes, and snippets.

View mrarsenal10's full-sized avatar

Tran Pham Tuan Anh mrarsenal10

  • Ho Chi Minh
  • 04:53 (UTC -12:00)
View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@mrarsenal10
mrarsenal10 / js-expired-token.js
Created May 18, 2021 00:42 — forked from paulnguyen-mn/js-expired-token.js
Xử lý expired token trong javascript (js nâng cao)
// Easy Frontend
// Học FE đơn giản, dễ hiểu và đặc biệt phải vui ❤️
// JS NÂNG CAO - Xử lý expired token trong Javascript như thế nào?
// ❓ Chuyện gì xảy ra nếu giữa chừng token bị expired?
// Ví dụ: 3 api requests đồng thời với nhau
// TRƯỜNG HỢP 1: Token chưa expired, vẫn còn tốt chán 🤣
// --request 1-->
@mrarsenal10
mrarsenal10 / decoratedFetch.ts
Created May 17, 2021 10:29 — forked from panzerdp/decoratedFetch.ts
An extensible fetch() implementation that uses the decorator pattern
type ResponseWithData = Response & { data?: any };
interface Fetcher {
run(input: RequestInfo, init?: RequestInit): Promise<ResponseWithData>;
}
class BasicFetcher implements Fetcher {
async run(input: RequestInfo, init?: RequestInit): Promise<ResponseWithData> {
return await fetch(input, init);
}
@mrarsenal10
mrarsenal10 / fetch-api-examples.md
Created April 18, 2021 09:03 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@mrarsenal10
mrarsenal10 / 1README.md
Created August 8, 2020 14:29 — forked from joseluisq/1README.md
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

Lumen 5 HTTP Exception Handlers with JSON support.

Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

image

Setup

Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php and app/Http/Middleware/Authenticate.php

@mrarsenal10
mrarsenal10 / Response.php
Created August 8, 2020 14:21 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@mrarsenal10
mrarsenal10 / cloudSettings Create React App + ESLint + Airbnb Javascript Style Guide + Prettier + VS Code
{"lastUpload":"2021-04-20T03:59:20.871Z","extensionVersion":"v3.4.3"}