Skip to content

Instantly share code, notes, and snippets.

View fuongz's full-sized avatar
👷
Work late at night!

Phuong Phung fuongz

👷
Work late at night!
View GitHub Profile
@fuongz
fuongz / gist:5fd00a917837a4a353fbb857a6614aa7
Created October 17, 2023 10:05
Fuongz's Repo Banner!
YOLO!
[
{
"author": "Abraham Lincoln",
"text": "A house divided against itself cannot stand."
},
{
"author": "Abraham Lincoln",
"text": "Important principles may, and must, be inflexible."
},
{
@fuongz
fuongz / mapOrder.php
Created April 12, 2023 09:59
Order an array of objects based on another array order (fork from: https://gist.github.com/ecarter/1423674)
<?php
$arrayA = [
[
"status" => "Wait",
"id" => 1
],
[
"status" => "Approve",
"id" => 2
@fuongz
fuongz / I'm an early 🐤
Last active May 31, 2023 00:12
I'm an early 🐤
🌞 Morning 25 commits ██▋░░░░░░░░░░░░░░░░░░ 12.9%
🌆 Daytime 76 commits ████████▏░░░░░░░░░░░░ 39.2%
🌃 Evening 45 commits ████▊░░░░░░░░░░░░░░░░ 23.2%
🌙 Night 48 commits █████▏░░░░░░░░░░░░░░░ 24.7%
code --install-extension Angular.ng-template
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension bradlc.vscode-tailwindcss
code --install-extension christian-kohler.path-intellisense
code --install-extension csstools.postcss
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension EditorConfig.EditorConfig
code --install-extension esbenp.prettier-vscode
import type { NextApiRequest, NextApiResponse } from 'next'
const getYoutubePlaylistId = (url: string): string => {
const regExp = /list=([^&]+)/
const match = regExp.exec(url)
if (match) {
return match[1]
}
return ''
}
@fuongz
fuongz / 📊 Weekly development breakdown
Last active July 11, 2023 00:12
📊 Weekly development breakdown
TypeScript 10 hrs 20 mins ███████████████▎░░░░░ 72.7%
PHP 1 hr 26 mins ██▏░░░░░░░░░░░░░░░░░░ 10.2%
Python 1 hr 16 mins █▉░░░░░░░░░░░░░░░░░░░ 9.0%
HTML 20 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.4%
MDX 14 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.8%
@fuongz
fuongz / Dockerfile
Created November 19, 2019 06:30
PHP Dockerfile with xdebug, redis, apcu enabled
FROM php:7.1.33-alpine3.10
LABEL version="1.0.0",maintainer="[email protected]"
RUN apk update; \
apk upgrade; \
apk add --no-cache \
$PHPIZE_DEPS openssl ca-certificates curl tzdata autoconf gcc icu-dev libmcrypt-dev freetype-dev jpeg-dev libjpeg-turbo-dev libwebp-dev libpng-dev libxpm-dev bzip2-dev
RUN docker-php-ext-configure intl \
@fuongz
fuongz / baser.sh
Last active September 4, 2019 15:45
#!/usr/bin/env bash
if [[ ! -z baser ]]; then
git clone [email protected]:env/docker.git baser
mv baser /usr/local/lib/
ln -s /usr/local/lib/baser/base /usr/local/bin/baser
chmod +x /usr/local/bin/baser
rm -rf baser
fi