Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
name: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: |
// | |
// JSONMappable.swift | |
// | |
// Created by Linh Le Manh on 14/01/2022. | |
// | |
import SwiftyJSON | |
protocol JSONMappable { | |
init?(json: JSON) |
# Note: You MUST have curl 7.47+ with http/2 support compiled in | |
curl -v \ | |
-d '{"aps":{"alert":"<message>","badge":42}}' \ | |
-H "apns-topic: <bundle id>" \ | |
-H "apns-priority: 10" \ | |
--http2 \ | |
--cert <certificate file> \ | |
https://api.development.push.apple.com/3/device/<device token> |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt update && sudo apt install yarn | |
# https://www.howtoforge.com/tutorial/how-to-setup-zsh-and-oh-my-zsh-on-linux/ | |
apt install zsh | |
chsh -s /usr/bin/zsh root | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc |
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
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |
extension String{ | |
func removeDiacritic() -> String { | |
var temp2 = self | |
for character in "ạảãàáâậầấẩẫăắằặẳẵ".characters{ | |
temp2 = temp2.replace(String(character), "a") | |
} | |
for character in "óòọõỏôộổỗồốơờớợởỡ".characters{ | |
temp2 = temp2.replace(String(character), "o") | |
} |