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
const tls = require('tls'); | |
const https = require('https'); | |
const crypto = require('crypto'); | |
const axios = require('axios'); | |
function sha256(s) { | |
return crypto.createHash('sha256').update(s).digest('base64'); | |
} | |
const options = { |
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
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/session-manager-plugin.pkg" -o "session-manager-plugin.pkg" | |
sudo installer -pkg session-manager-plugin.pkg -target / | |
sudo ln -s /usr/local/sessionmanagerplugin/bin/session-manager-plugin /usr/local/bin/session-manager-plugin |
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
cd /Library/LaunchAgents | |
Open com.paloaltonetworks.gp.pangpa.plist and change to false for RunAtLoad and KeepAlive | |
Open com.paloaltonetworks.gp.pangps.plist and change to false for RunAtLoad |
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
vim /etc/pam.d/sudo | |
auth sufficient pam_tid.so | |
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
export enum DateFormat { | |
// ISO 8601 | |
API_DATE = 'YYYY-MM-DD', | |
API_DATETIME = 'YYYY-MM-DDTHH:mm:ssZ', | |
API_TIME = 'HH:mm:ss', | |
// These should be the standardized formats for displaying date/time on frontend, | |
// if designers' designs show otherwise, we should advise them to standardize the format by using these | |
DISPLAY_DATE = 'DD MMM YYYY', | |
DISPLAY_DATETIME = 'DD MMM YYYY, h:mm A', |
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
export const Regex = { | |
POSTAL_CODE: /^[0-9]{6}$/, | |
ADDRESS_FLOOR: /^[0-9]{1,2}[a-zA-Z]?$/, | |
ADDRESS_UNIT: /^[0-9][a-zA-Z0-9]{1,4}$/, | |
CONTACT_NUMBER: /^(9[0-8]|[368][0-9])[0-9]{6}$/, | |
LAND_LINE_NUMBER: /^[36][0-9]{7}$/, | |
MOBILE_NUMBER: /^(9[0-8]|8[0-9])[0-9]{6}$/, | |
// RFC 5322 | |
EMAIL: /^(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/, | |
PEOPLE_NAME: /^[a-zA-Z @\-–/().,'’]+$/, |
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
openssl s_client -servername $1 -connect $1:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 |
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
npx npm-check-updates -u |
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.8' | |
services: | |
mysql: | |
container_name: mysql8 | |
image: mysql:8.0.22 | |
ports: | |
- 3306:3306 | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
- MYSQL_ROOT_PASSWORD= |
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
Show hidden characters
{ | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, | |
"settings": { | |
"react": { | |
"version": "detect" | |
} |
NewerOlder