This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create react app in the current folder | |
npx create-react-app . | |
// React’s useEffect Hook to call API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
wordpress: | |
image: wordpress | |
deploy: | |
replicas: 1 | |
restart_policy: | |
condition: on-failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change to the project directory | |
cd /home/forge/domain.com | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// install the cli command | |
npm -i g @nestjs/cli | |
// create a new project | |
nest new <project_name> | |
// Create a controller | |
nest g controller <controller_name> | |
// Create a service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install Angular CLI | |
npm install -g @angular/cli | |
// Use a specific version of Angular | |
npm uninstall -g @angular/cli | |
npm install -g @angular/cli@12 // Install Angular 12 | |
ng new my-app // Create new app using angular 12 | |
// Setup a new Angular app | |
ng new blog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clearCookies() { | |
if (location.hostname == 'domain.com') { | |
document.cookie.replace( | |
/(?<=^|;).+?(?=\=|;|$)/g, | |
name => location.hostname | |
.split(/\.(?=[^\.]+\.)/) | |
.reduceRight((acc, val, i, arr) => i ? arr[i]='.'+val+acc : (arr[i]='', arr), '') | |
.map(domain => document.cookie=`${name}=;max-age=0;path=/;domain=${domain}`) | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check the podman version | |
sudo podman --version | |
// search for container image | |
sudo podman search rhel | |
// search with filter | |
sudo podman search rhel --filter="is-official=true" | |
// pull image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference: https://www.youtube.com/watch?v=PmOMc4zfCSw | |
To download the latest vagrant, visit: | |
https://www.vagrantup.com/downloads | |
To install Vagrant on mac, simply run this in the terminal: | |
brew install vagrant | |
To search for vagrant VMs or boxes, visit: | |
https://app.vagrantup.com/boxes/search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference: | |
https://djangocas.dev/blog/test-tls-connectivity-with-openssl/#use--connect-hostport-to-connect-to-a-tls-server | |
============================================================ | |
Summary: openssl s_client commands examples quick references | |
============================================================ | |
Test TLS connection: | |
openssl s_client -connect www.google.com:443 | |
Show all certificates chain: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference : | |
https://www.youtube.com/watch?v=TLB5MY9BBa4 | |
Github actions are basically composed of 3 components, they are: | |
- Events | |
- Workflows | |
- Actions | |
The events will trigger the workflows, and the workflows will trigger the actions. | |
====== |
OlderNewer