Skip to content

Instantly share code, notes, and snippets.

View shady1440's full-sized avatar

Shady shady1440

View GitHub Profile
@shady1440
shady1440 / multiple_ssh_setting.md
Created November 27, 2022 22:09 — forked from jexchan/multiple_ssh_setting.md
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 "[email protected]"
@shady1440
shady1440 / .gitconfig
Created November 27, 2022 19:55
git config for multiple directory
[user]
email = DEFAULT_EMAIL_HERE
name = DEFAULT_NAME_HERE
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig-work
[includeIf "gitdir:~/personal/"]
path = ~/.gitconfig-personal
@shady1440
shady1440 / full-uninstall-cocoapods.sh
Created October 31, 2022 12:20
Remove Cocoapods from gem
#!/bin/bash
for i in $( gem list --local --no-version | grep cocoapods );
do
gem uninstall $i;
done
rm -rf ~/.cocoapods/
@shady1440
shady1440 / youtube-dl.conf
Last active April 28, 2020 20:05
my configuration for youtube-dl
-u "[USER_NAME_OR_EMAIL]"
-p "[PASSWORD]"
-i
-c
--no-warnings
--no-check-certificate
--restrict-filenames
--add-header Referer:"https://app.pluralsight.com/library/courses/"
--console-title
--batch-file='batch-file.txt'
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
class App {
public static void main(String[] args) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-mm-dd");
LocalDateTime now = LocalDateTime.now();
System.out.println("current date: " + formatter.format(now));
@shady1440
shady1440 / strong-password-regex.md
Created November 4, 2019 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]).*$/