Skip to content

Instantly share code, notes, and snippets.

View vunamhung's full-sized avatar
🎯
Focusing

Hung Vu vunamhung

🎯
Focusing
View GitHub Profile
stages:
- build
- deploy
build-prod:
stage: build
when: manual
variables:
CONTAINER_NAME: gitlab.cloudasset.com:5000/hung.vu/soneri
script:
const data = [
{
name: 'Jan',
'Allocated to ESL': randomInteger(10, 120),
'ESL Part': randomInteger(6, 12),
'Allocated to customer': randomInteger(10, 120),
},
{
name: 'Feb',
'Allocated to ESL': randomInteger(10, 120),
const data = [
{
name: 'Jan',
'Planned Voyages': 300,
},
{
name: 'Feb',
'Planned Voyages': 300,
},
{
const data = [
{
name: 'Jan',
'price of EUA used': randomInteger(300, 1200),
'EUA amount': randomInteger(300, 1200),
},
{
name: 'Feb',
'price of EUA used': randomInteger(300, 1200),
},
const data = [
{
name: 'Jan',
'EUA price': randomInteger(600, 1200),
'EUA amount': randomInteger(10, 120),
},
{
name: 'Feb',
'EUA price': randomInteger(600, 1200),
'EUA amount': randomInteger(10, 120),
const list = [
{ name: '日本', dial_code: '+81', code: 'JP', flag: '🇯🇵' },
{ name: 'Afghanistan', dial_code: '+93', code: 'AF', flag: '🇦🇫' },
{ name: 'Albania', dial_code: '+355', code: 'AL', flag: '🇦🇱' },
{ name: 'Algeria', dial_code: '+213', code: 'DZ', flag: '🇩🇿' },
{ name: 'AmericanSamoa', dial_code: '+1684', code: 'AS', flag: '🇦🇸' },
{ name: 'Andorra', dial_code: '+376', code: 'AD', flag: '🇦🇩' },
{ name: 'Angola', dial_code: '+244', code: 'AO', flag: '🇦🇴' },
{ name: 'Anguilla', dial_code: '+1264', code: 'AI', flag: '🇦🇮' },
{ name: 'Antarctica', dial_code: '+672', code: 'AQ', flag: '🇦🇶' },
import axios, { AxiosError } from 'axios';
import { parse } from 'json-bigint';
const http = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL,
transformResponse(response) {
return parse(response);
},
});

Install Zsh and Oh-my-zsh on CentOS 7

Based on this article

ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does

This script can be copy paste to ssh as is. No hands installation. :-)

yum install zsh -y
curl 'https://beta2.teeshirt21.dev/api/cart-checkout/add-cart' \
-H 'authority: beta2.teeshirt21.dev' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"' \
-H 'accept: application/json, text/plain, */*' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://teeshirt21.vercel.app' \