Skip to content

Instantly share code, notes, and snippets.

View AJ-7885's full-sized avatar
👑
Crafted with care, coded by coffee, celebrated with champagne

AJ AJ-7885

👑
Crafted with care, coded by coffee, celebrated with champagne
  • Freelancer
  • BirthPlace: Earth, Politics: Freedom, Religion: Love
View GitHub Profile

If you don't remember the exact path/name, search the log for deleted files

git log --diff-filter=D --summary | grep delete

Find the file you want to get from the ouput, and use the path

Find the commits that involved that path

git log --all -- some/path/to/deleted.file

Bring the file back to life to the current repo (sha commit of parent of commit that deleted)

git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file

@AJ-7885
AJ-7885 / .npmrc
Created September 21, 2022 07:45
Working with the Github registry (NPM)
//npm.pkg.github.com/:_authToken=PA-TOKEN
@idealo:registry=https://npm.pkg.github.com
# C
- GCE
# F
- ACF
# Am
- ACE
# G
- GBD
# Em
- GBE
@AJ-7885
AJ-7885 / Quotes
Created December 9, 2020 10:19
Intersting quotes collection
### if you are not making mistakes then you are not doing anything.
- Johan Wocden
### The best way tp predict your future is to create it.
- ?
@AJ-7885
AJ-7885 / Mac PC Setup for Dev Environment
Last active June 19, 2024 15:29
Setup MAC for Java & JavaScript Developer
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install nvm
mkdir ~/.nvm
vim ~/.bash_profile
In your .bash_profile file (you may be using another file, according to your shell), add the following : export NVM_DIR=~/.nvm . source $(brew --prefix nvm)/nvm.sh
source ~/.bash_profile
echo $NVM_DIR
nvm install 11.0.0
@AJ-7885
AJ-7885 / README-Template.md
Last active January 24, 2024 12:42
READ ME FILE TEMPLATE

Project Title

Short blurb about what your product does.

One Paragraph of project description goes here, there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Table of Contents

@AJ-7885
AJ-7885 / List-of-node-based-CMS.md
Last active January 24, 2024 12:43
[WIP] List of Node-based content management systems (CMS)
@AJ-7885
AJ-7885 / convert-m3u8-to-mp4.md
Last active January 24, 2024 12:44
Convert m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@AJ-7885
AJ-7885 / .gitignore
Last active January 24, 2024 12:45
Git Ignore template
# misc
.DS_Store
.env
logs/*
!.gitkeep
# Eclipse
.classpath
.project
var time = new Date();
console.info(time.toUTCString());
time.setMinutes(time.getUTCMinutes() - 60);
console.info(time.toUTCString());
console.info(time.getUTCFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getUTCDate() + ' ' + time.getUTCHours() + ':' + time.getUTCMinutes() + ':' + time.getUTCSeconds());