"C:\Users\bryan\AppData\Local\Microsoft\WindowsApps\ubuntu.exe"
CNTX={users}; NAME={oreillymedia}; PAGE=4 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
wget -r -A.pdf https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-notes/
Trim folder names or file names rename 's/^(.{10}).*/$1/' *
---------------------------------------------------Main Commands--------------------------------------------------------------------------- find . -empty -type d -print -delete OR find . -depth -exec rmdir {} ;
fdupes -r -f . | grep -v '^$' | xargs rm -v
find . -empty -type f -print -delete
find . -empty -type d -print -delete
find . ( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" ) -exec rm -rf -- {} +
find . ( -name "*SECURITY.txt" -o -name "*RELEASE.txt" -o -name "*CHANGELOG.txt" -o -name "*LICENSE.txt" -o -name "*CONTRIBUTING.txt" -name "*HISTORY.md" -o -name "*LICENSE" -o -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CODE_OF_CONDUCT.md" -o -name "*CONTRIBUTING.md" ) -exec rm -rf -- {} +
find . -name '__MACOSX' -type d -prune -exec rm -rf '{}' +
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
find . -size +98M -a -print -a -exec rm -f {} ;
--------------------------------------------Remove lines of file contaning a string------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sudo sed -i '/Mirrored from/d' ./.html sudo sed -i '/This is Squarespace/d' ./.html sudo sed -i '/authors/d' ./*.md sudo sed -i '/assets/d' ./index.html
---------------------------------------------To find a pattern and remove the line containing the pattern below command can be used---------------------------------------------------------------------------------------------------------------------- find . -name "*" -type f | xargs sed -i -e '/Mirrored from/d'
find . -name '' -type f | xargs sed -i -e '/Author/d' find . -name "" -type f | xargs sed -i -e '/author/d'
npm i --legacy-peer-deps
---------Flatten (denest) all sub folders into one folder contaning files.---------------------------------------------
find ./ -mindepth 1 -type f -exec mv -t ./ --backup=t '{}' +
-----------------------------------------------Download all of a users repos----------------------------------------------------------
twbs
curl -s https://api.github.com/orgs/NHQ/repos | grep "clone_url" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
curl -s https://api.github.com/users/sokra/repos | grep "clone_url" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
----------------------------------------Make on a timer-----------------------------------------------------------------
while sleep 25; do make; done
while sleep 25; do prettier --write .; done
while sleep 25; do black .; done
while sleep 25; do find . ( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" ) -exec rm -rf -- {} +; done
while sleep 205; do find . ( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" ) -exec rm -rf -- {} +; done
-----------------------------------------COMBINE ALL FILES OF A CERTAIN TYPE----------------------------------------------------------------
for f in *.md; do cat "${f}"; echo; done > Combined_____-_____Doc.md
for f in *.js; do cat "${f}"; echo; done > Combined_____-_____Doc.md
for f in *.py; do cat "${f}"; echo; done > Combined_____-_____Doc.md
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD
-------------------------------------------WGET DOWNLOAD WEBSITE--------------------------------------------------------------
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://wolverine-cod-awhs.squarespace.com/overview
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://wolverine-cod-awhs.squarespace.com/overview
sudo sed -i '/authors/d' ./*.md
---------Delete files with certain string in name------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
find -type f -name 'text' -delete
find -type d -name 'Learning-Path' -delete
-----------------------------------------ZIP UTILS----------------------------------------------------------------------------------------- 4.)Recursive-unzip:()===>
find . -name "*.zip" | while read filename; do unzip -o -d "dirname "$filename"
" "$filename"; done;
find . -name "*.zip" -type f -print -delete
find . -name '*robots.txt' -type d -prune -exec rm -rf '{}' +
Install node modules recursevly ( npm i -g recursive-install ):
npm-recursive-install
---------------------------------------PANDOC------------------------------------------------------------------
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} ;
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} ;
find ./ -iname "*.docx" -type f -exec sh -c 'pandoc "${0}" -o "${0%.docx}.md"' {} ;
find . -name '*.rst' -exec pandoc {} -f rst -t markdown -o {}.md ;
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.pdf"' {} ;
for /R %a in (.htm) do pandoc “%a” -f html -t latex -s -o “%~pa%~na.pdf”
find . -name 'sitemap.html' -type f -prune -exec rm -rf '{}' +
-------------------------------------------------------------Symbolic Link-------------------------------------------- sudo ln -s ./mnt/c/MY-WEB-DEV
ln -s "$(pwd)" ~/NameOfLink
find . -name 'sitemap.html' -type f -prune -exec rm -rf '{}' +
find . -name 'sitemap.md' -type f -prune -exec rm -rf '{}' +
git pull
git init git add . git commit -m"update" git push -u origin master
git init git add . git commit -m"update" git push -u origin gh-pages
git init git remote add origin https://github.com/Archive-42/september-downloads-archive.git git add . git commit -m"update" git push -u origin master
find . -name '.bin' -type d -prune -exec rm -rf '{}' +
find . -name '*.html' -type d -prune -exec rm -rf '{}' +
find . -name 'nav-index' -type d -prune -exec rm -rf '{}' +
find . -name 'node-gyp' -type d -prune -exec rm -rf '{}' +
find . -name 'deleteme.txt' -type f -prune -exec rm -rf '{}' +
find . -name 'right.html' -type f -prune -exec rm -rf '{}' +
find . -name 'left.html' -type f -prune -exec rm -rf '{}' +
----------------------------------------------Delete files smaller thatn 2k-----------------------------------------------------------
find . -name "*.js" -type 'f' -size -2k -delete
find . -name "*.py" -type 'f' -size -2k -delete
find . -name "*.md" -type 'f' -size -2k -delete
find . -name "*.html" -type 'f' -size -2k -delete
----------------------------------------------Remove Spaces In File/Folder Names-----------------------------------------------------------
find . -name "* " -type d | rename 's/ /_/g'
find . -name " *" -type f | rename 's/ /_/g'
#!/bin/bash
dir=''
IFS='
'
for f in $(find $dir * -type f) ; do
mv "$f" "echo $f | sed 's/^[0-9]*\W*//'
";
done
find $dir -type f | sed 's|(./)[^A-Z]([A-Z].*)|mv "&" "\1\2"|' | sh
find $dir -type d | sed 's|(./)[^A-Z]([A-Z].*)|mv "&" "\1\2"|' | sh
for i in .html; do mv "$i" "${i%-}.html"; done
for i in .; do mv "$i" "${i%-}.${i##.}"; done
-
PANDOC
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} ;
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} ;
find . -name "* *" -type f | rename 's/sitemap/index/g'
find . -name "* *" -type f | rename 's/_//g'
find . -name "* " -type d | rename 's/#/_/g'
find -type f -name "~*" -execdir rename -n -v 's/#//' {} +
find . -name "* *" -type f | rename 's/#/_/g'
find . -name "* *" -type f | rename 's/.html//g' ------------------------------------Truncate folder names down to 12 char------------------------------------------------------------------------
for d in ./*; do mv
#!/bin/bash
for file in *.md.md do mv "${file}" "${file%.md}" done
#!/bin/bash
for file in *.html.html do mv "${file}" "${file%.html}" done
Remove double extensions :
#!/bin/bash
for file in *.html.html do mv "${file}" "${file%.html}" done
#!/bin/ksh for i in '.' do echo mv "${i}" "${i##????}" done -------------------------------------FIND AND REPLACE IN STRING/FOLDER NAMES----------------------------------------------------------------
find . -type f -exec rename 's/string1/string2/g' {} +
find . -type d -exec rename 's/-master//g' {} +
find . -type d -exec rename 's/-main//g' {} +
find . -type f -exec rename 's/.download//g' {} +
find . -type f -exec rename 's/sitemap/index/g' {} +
find . -type d -exec rename 's/-main//g' {} +
rename 's/.js.download$/.js/' *.js.download
rename 's/.html.markdown$/.md/' *.html.markdown
find . -type d -exec rename 's/es6//g' {} +
for d in *.; do
tmp=echo $f | sed -r 's//^(.{5}).*(\..*)$/$1$2/'
mv -b ./"$f" ./"$tmp"
done
rawFileName=$(basename "$1") filename="${rawFileName%.}" ext="${rawFileName##.}"
if [[
Remove double extensions :
#!/bin/bash
for file in *.html.html do mv "${file}" "${file%.html}" done
#!/bin/bash
for file in *.html.png do mv "${file}" "${file%.png}" done
for file in *.jpg.jpg do mv "${file}" "${file%.png}" done
#!/bin/bash
for file in *.html.png do mv "${file}" "${file%.png}" done
for file in *.jpg.jpg do mv "${file}" "${file%.png}" done
#!/bin/bash
for file in *.md.md do mv "${file}" "${file%.md}" done
find . -type f -exec ' {} +
#!/bin/bash
num=1
length=16
for file in '.'
do
newname=$file
until [[ ! -f
RUN GIT FLOW EVERY 2 MINUTES:
while sleep 120; do git init && git add . && git commit -m "update" && git push -u origin master; done
OR:
while sleep 25; do make; done
Clone Only .git folder:
git clone --no-checkout https://github.com/bgoonz/UsefulResourceRepo2.0.git
find . -size +100k -delete
git pull
git init git add . git commit -m"update" git push -u origin master
git init git add . git commit -m"update" git push -u origin main
git init git add . git commit -m"update" git push -u origin bryan-guner
git init git add . git commit -m"update" git push -u origin gh-pages
git init git add . git commit -m"update" git push -u origin imgbot
git pull keeping local changes:
CLONE ALL:
CNTX={users|orgs}; NAME={username|orgname}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={users}; NAME={NHQ}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={users}; NAME={NHQ}; PAGE=2 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={users}; NAME={NHQ}; PAGE=3 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={users|orgs}; NAME={username|orgname}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={octokit}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={octokit}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={FreeCodeCamp-Solutions}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={netlify-templates}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={circlecell}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={users}; NAME={decagondev}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={users}; NAME={oreillymedia}; PAGE=4 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={organizations}; NAME={WebDevSimplified}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=200"?branch=master | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={organizations}; NAME={psf}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=200"?branch=master | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={firebase}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={firebase}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
CNTX={orgs}; NAME={Archive-42}; PAGE=1 curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | grep -e 'git_url*' | cut -d " -f 4 | xargs -L1 git clone
Clone Orginization:
#!/bin/bash for i in $(curl "https://api.github.com/orgs/freeCodeCamp/repos" | grep -oP '"clone_url":\s*"\K[^"]+'); do echo git clone "$i" done
Clone Orginization:
#!/bin/bash for i in $(curl "https://api.github.com/orgs/netlify/repos" | grep -oP '"clone_url":\s*"\K[^"]+'); do echo git clone "$i" done
#!/bin/bash for i in $(curl "https://api.github.com/orgs/react-component/repos" | grep -oP '"clone_url":\s*"\K[^"]+'); do echo git clone "$i" done
#!/bin/bash for i in $(curl "https://api.github.com/orgs/w3c/repos" | grep -oP '"clone_url":\s*"\K[^"]+'); do echo git clone "$i" done
tree -d -I 'node_modules'
tree -I 'node_modules'
tree -f -I 'node_modules' >TREE.md
tree -f -L 2 >README.md
tree -f -L 3 -I 'node_modules' >listing-path.md
tree -f -I 'node_modules' -d >TREE.md
tree -f >README.md
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} +
sudo npm i prettier -g
prettier --write . prettier --write "./**/*.{js,jsx,py,md,html,css}"
"pretty": "prettier --write "./**/*.{js,jsx,py,md,html,css}""
Format Python:
black .
----------------------------------------Remove lines contaning string:----------------------------------------------------- sudo sed -i '/githubusercontent/d' ./*.md
sudo sed -i '/githubusercontent/d' ./*sandbox.md
sudo sed -i '/tip-tldrt/d' ./*scrap2.md
sudo sed -i '/github.com/d' ./*out.md
sudo sed -i '/New folder/d' ./bookmarks.md
---------------------------------MEDIUM EMBED----------------------------------------------------
https://replit.com/@bgoonz/js-tutorial#02.%20Introducing%20JavaScript/02.01.js.intro.html
https://repl.it/@bgoonz/data-structures?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
https://repl.it/@bgoonz/js-tutorial-1?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
https://repl.it/@bgoonz/Database-Prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
zips directory excluding .git and node_modules all the way down (linux)
#!/bin/bash
TSTAMP=date '+%Y%m%d-%H%M%S'
zip -r $1.$TSTAMP.zip $1 -x "**.git/" -x "**node_modules/" shift; echo $@;
printf "\nCreated: $1.$TSTAMP.zip\n"
Delete files contaning a certain string:
find . | xargs grep -l www.redhat.com | awk '{print "rm "$1}' > doit.sh vi doit.sh // check for murphy and his law source doit.sh
------------------------------------------------GIT--------------------------------------------------------- ------------------------------------------------GIT--------------------------------------------------------- ------------------------------------------------GIT---------------------------------------------------------
-------------------------------GET GISTS:
wget -q -O - https://api.github.com/users/bgoonz/gists | grep raw_url | awk -F" '{print $4}' | xargs -n3 wget
wget -q -O - https://api.github.com/users/amitness/gists | grep raw_url | awk -F" '{print $4}' | xargs -n3 wget
wget -q -O - https://api.github.com/users/drodsou/gists | grep raw_url | awk -F" '{print $4}' | xargs -n1 wget
wget -q -O - https://api.github.com/users/thomasmb/gists | grep raw_url | awk -F" '{print $4}' | xargs -n1 wget
wget -q -O - https://api.github.com/users/koraktor/gists | grep raw_url | awk -F" '{print $4}' | xargs -n1 wget
watch -n '100' "git pull && (git ls-files --modified --others --exclude-standard | grep . > /dev/null) && { git add . ; git commit -m '' ; git push; }"
git remote remove origin
just clone .git folder:
git clone --bare --branch=master --single-branch https://github.com/bgoonz/My-Web-Dev-Archive.git
Undo recent pull request: git reset --hard master@{"10 minutes ago"}
Open PowerShell and enter wslconfig.exe /l to confirm WSL is installed correctly and list the currently available Linux distributions within your system. Confirm a valid distribution has (default) next to it. To change the default distribution, enter wslconfig.exe /setdefault "distributionNameAsShownInList" The terminal not working when running the 32-bit Windows client on 64-bit Windows?# The easy fix for this issue is to use the 64-bit version. If you must use the 32-bit version, you need to use the sysnative path when configuring your shell path instead of System32. Adding this setting should fix the issue:
To remove a submodule you need to:
Delete the relevant section from the .gitmodules file. Stage the .gitmodules changes git add .gitmodules Delete the relevant section from .git/config. Run git rm --cached path_to_submodule (no trailing slash). Run rm -rf .git/modules/path_to_submodule (no trailing slash). Commit git commit -m "Removed submodule " Delete the now untracked submodule files rm -rf path_to_submodule ----------------------------------------Lebab----------------------------------------------------------------- LEBAB
npm i lebab -g
safe:
lebab --replace ./ --transform arrow lebab --replace ./ --transform arrow-return lebab --replace ./ --transform for-of lebab --replace ./ --transform for-each lebab --replace ./ --transform arg-rest lebab --replace ./ --transform arg-spread lebab --replace ./ --transform obj-method lebab --replace ./ --transform obj-shorthand lebab --replace ./ --transform multi-var
ALL:
lebab --replace ./ --transform obj-method lebab --replace ./ --transform class lebab --replace ./ --transform arrow lebab --replace ./ --transform let lebab --replace ./ --transform arg-spread lebab --replace ./ --transform arg-rest lebab --replace ./ --transform for-each lebab --replace ./ --transform for-of lebab --replace ./ --transform commonjs lebab --replace ./ --transform exponent lebab --replace ./ --transform multi-var lebab --replace ./ --transform template lebab --replace ./ --transform default-param lebab --replace ./ --transform destruct-param lebab --replace ./ --transform includes lebab --replace ./ --transform obj-method lebab --replace ./ --transform class lebab --replace ./ --transform arrow lebab --replace ./ --transform arg-spread lebab --replace ./ --transform arg-rest lebab --replace ./ --transform for-each lebab --replace ./ --transform for-of lebab --replace ./ --transform commonjs lebab --replace ./ --transform exponent lebab --replace ./ --transform multi-var lebab --replace ./ --transform template lebab --replace ./ --transform default-param lebab --replace ./ --transform destruct-param lebab --replace ./ --transform includes
---------------------------------------Trouble Shooting------------------------------------------------------------------ input/Output error
wsl.exe --shutdown
Get-Service LxssManager | Restart-Service
---------------------When you only clone .git folder------------------------------------------------------------------------------------
git restore --source=HEAD :/
When resolving a peer dependency that has a ">=" in it's version, npm uses the latest version of that package to compare with the current dependency version in the package.json.
In this case: npm is looking for react 17, while react 16.13 is also a version that is suits >=16.9.0
npm i --legacy-peer-deps
Fudge2312!
IP: 173.70.97.51
Log into postgres: sudo -u postgres psql -------------------------------------------------------------Symbolic Link-------------------------------------------- sudo ln -s ./mnt/c/MY-WEB-DEV
ln -s "$(pwd)" ~/NameOfLink
return to bash from zsh sudo apt --purge remove zsh
----------------Unzip PowerShell UNZIP: PARAM ( [string] $ZipFilesPath = "./", [string] $UnzipPath = "./RESULT" )
$Shell = New-Object -com Shell.Application $Location = $Shell.NameSpace($UnzipPath)
$ZipFiles = Get-Childitem $ZipFilesPath -Recurse -Include *.ZIP
$progress = 1
foreach ($ZipFile in
$Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes to the user - http://msdn.microsoft.com/en-us/library/bb787866%28VS.85%29.aspx
$progress++
}
cat w07_data-structures-and-algorithms.md* | codedown javascript > code.js
cat README.md* | codedown javascript > code.js cat interview Questions.md* | codedown javascript > code.js cat README.md* | codedown javascript > code.js
cat w08_getting-to-know-the-network.html* | codedown javascript > code.js
cat *.html | codedown javascript > code.js
cat *.markdown | codedown javascript > code.js
----------------------------------auto generate readme-----------------------------------------------------------------------
rename existing readme to blueprint.md
npx @appnest/readme generate
npm i -g mdt-docs-generator
RENAME README.md ===> README_RAW.md
---------------------------------Export Medium as Markdown------------------------------------------------------------------------
mediumexporter https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4 >ds.md
-------------------------Delete within size range--------------------------------------------------------------------------------
find . -size +386b -a -size -390b -exec rm -f {} ;
find . -size +2000b -exec rm -f {} ;
Create symbolic link to working directory
ln -s "$(pwd)" ~/mylink
npm install redux-logger redux-thunk styled-components
find -type f -exec sed -i 's///g' {} +
INSTEAD OF GIT PUSH _F :git reset --hard upstream/master
TRIM ALL(USE WITH CAUTION):
find . -depth -exec rmdir {} ;
find . -empty -type f -print -delete
find . -empty -type d -print -delete
find . ( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" ) -exec rm -rf -- {} +
find . ( -name "*SECURITY.txt" -o -name "*RELEASE.txt" -o -name "*CHANGELOG.txt" -o -name "*LICENSE.txt" -o -name "*CONTRIBUTING.txt" -name "*HISTORY.md" -o -name "*LICENSE" -o -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CODE_OF_CONDUCT.md" -o -name "*CONTRIBUTING.md" ) -exec rm -rf -- {} +
find . ( -name "*SECURITY.txt" -o -name "*RELEASE.txt" -o -name "*CHANGELOG.txt" -o -name "*LICENSE.txt" -o -name "*CONTRIBUTING.txt" -name "*HISTORY.md" -o -name "*LICENSE" -o -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CODE_OF_CONDUCT.md" -o -name "*CONTRIBUTING.md" ) -exec rm -rf -- {} +
Replace spaces in filenames with underscores
for file in *; do mv "$file" echo $file | tr ' ' '_'
; done
Netlify error: 1:32:52 AM: Error checking out submodules: fatal: No url found for submodule path '2-content/awesome-resources/Cumulative-Resource-List-master' in .gitmodules
git rm --cached 2-content/awesome-resources/Cumulative-Resource-List-master
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://bryan-guner.gitbook.io/python/
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://www.notion.so/webdevhub42/72b1342736094af4bd0992bad4dd2267?v=7f80269e29ee4a79a8227187cbf69c39
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://blog.archive.org/developers/
find . -name "*right.md" -type f -print -delete
find . -name "*right.html" -type f -print -delete
find . -name "*left.html" -type f -print -delete
find . -name "*analytics.js" -type f -print -delete
find . -name "*.zip" | while read filename; do unzip -o -d "dirname "$filename"
" "$filename"; done;
find . -name "*desktop.ini" -type f -print -delete
find . -name "*.zip" -type f -print -delete
find ./ -type f -name *.tar.gz -exec tar -xf {} ;
git remote remove origin
find . -name "*.gz" -type f -print -delete dac9ba0
PUSH IN CHUNCKS: REMOTE=origin BRANCH=$(git rev-parse --abbrev-ref HEAD) BATCH_SIZE=10
range=HEAD
echo "Range: $r"
n=$(git log --first-parent --format=format:x $range | wc -l)
echo "Commits to push: $n"
for i in $(seq $n -$BATCH_SIZE 1); do # get the hash of the commit to push h=$(git log --first-parent --reverse --format=format:%H --skip $i -n1) echo "Pushing $h..." git push $REMOTE $h:refs/heads/$BRANCH --force done
git push $REMOTE HEAD:refs/heads/$BRANCH
PRISM:
<script async defer src="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/misc/web-dev-utils/personal-utilities/prism/prism.js"></script>Powershell unzip:
$folderPath="PWD";
Get-ChildItem $folderPath -recurse | %{
if($_.Name -match "^*.`.zip$")
{
$parent="$(Split-Path $_.FullName -Parent)";
write-host "Extracting $($_.FullName) to $parent"
$arguments=@("e", "`"$($_.FullName)`"", "-o`"$($parent)`"");
$ex = start-process -FilePath "`"C:\Path\To\7zip\7z.exe`"" -ArgumentList $arguments -wait -PassThru;
if( $ex.ExitCode -eq 0)
{
write-host "Extraction successful, deleting $($_.FullName)"
rmdir -Path $_.FullName -Force
}
}
}
------------------------------------Concat all files of same type recursively---------------------------------------------------------------------
find /path/to/directory/ -name *.csv -exec cat {} + > merged.file
find './' -name *.html -print0 | xargs -0 -I file cat file > merged.file.html
find './' -name *.py -print0 | xargs -0 -I file cat file > merged.file.md
find './' -name *.md -print0 | xargs -0 -I file cat file > merged.file.md
pandoc *.md > final.md
pandoc *.py > final.md
find . -name *.html -exec cat {} + > merged.file.html
find . -name *.md -exec cat {} + > merged.file.md
find . -name *.md -exec cat {} + > merged.file.md
find . -name *.html -exec cat {} + > merged.file.html
for f in *.html; do cat "${f}"; echo; done > output.html
for f in *.py; do cat "${f}"; echo; done > output.md
for f in *.md; do cat "${f}"; echo; done > output.md
for f in *.js; do cat "${f}"; echo; done > output.js
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} ;
find . -type f -exec sed -i '/Created by HTTrack/d' ./*.html {} ;
find . -type f -exec sed -i '/#/' ./*quandstack.py {} ;
find . -type f -exec sed -i '/Created on/d' ./*.py {} ;
find . -type f -exec sed -i '/path/d' ./scrap.md {} ;
sudo sed -i '/description/d' *.html
sudo sed -i '/WEEK-/d' README.html
sudo sed -i '/// Date :/d' *.js
find . -type f -exec sed -i '/Created by/d' ./*.html {} ;
find . -type f -exec sed -i '/Mirrored from/d' ./*.md {} ;
find . -type f -exec sed -i '/image004/d' ./*.html {} ;
find . -type f -exec sed -i '/:::/d' ./*.md {} ;
find . -type f -exec sed -i '/authors/d' ./*. {} ;
find . -type f -exec sed -i '/section:/d' ./*. {} ;
find . -type f -exec sed -i '/ Created by /d' ./*.html {} ;
find . -type f -exec sed -i '/
Document generated by Confluence on/d' ./*.html {} ;
find . -type f -exec sed -i '/