Skip to content

Instantly share code, notes, and snippets.

View junibrosas's full-sized avatar
🎯
Create! create! create!

Juni Brosas junibrosas

🎯
Create! create! create!
View GitHub Profile
@junibrosas
junibrosas / index.tsx
Last active May 9, 2023 06:02
Advance Typescript CheatSheet
/**
* Advance Types
*/
type ReadonlyProps<T> = {
readonly [P in keyof T]: T[P];
}
interface Props {
title: string;
@junibrosas
junibrosas / expo-documentation.md
Created May 7, 2023 14:53
Expo Documentation
@junibrosas
junibrosas / strong-password-regex.md
Created April 10, 2023 15:38 — forked from arielweinberger/strong-password-regex.md
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
@junibrosas
junibrosas / nvm-install
Created February 28, 2023 06:55
Run this script to install Node.js on the machine.
#!/bin/bash
# Check the latest version of NVM
curl https://github.com/nvm-sh/nvm/releases/latest | cut -d \/ -f 8 | cut -d \" -f 1
# Run the install script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
# Paste in this scripts into your .bashrc or .bash_profile
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Install node and npm
@junibrosas
junibrosas / multiple_ssh_setting.md
Last active November 25, 2022 12:58
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@junibrosas
junibrosas / installing-php-7.md
Last active November 22, 2022 08:53
Installing PHP 7.4

Update Ubuntu

sudo apt update && sudo apt upgrade

Install Required Packages

sudo apt install software-properties-common apt-transport-https -y
@junibrosas
junibrosas / install-LAMP-stack.md
Last active November 22, 2022 02:24
Installing LAMP Stack

Installing Apache and Updating the Firewall

sudo apt update

sudo apt install apache2

sudo ufw app list

sudo ufw allow in "Apache"
@junibrosas
junibrosas / docker-compose.yml
Created February 28, 2022 13:46
Docker with Redis
redis:
image: redis
container_name: cache
expose:
- 6379
app:
build: ./
volumes:
- ./:/var/www/app
links:
@junibrosas
junibrosas / launch.json
Last active January 13, 2021 07:06
VSCode debugging launch configuration examples
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch via npm",
"type": "node",
"request": "launch",
@junibrosas
junibrosas / .dockerignore
Created October 25, 2020 16:43 — forked from ksmithut/.dockerignore
Node Docker Compose nodemon
node_modules