-
-
Save bgoonz/0209a558079f173d64f8720b6c97e99a to your computer and use it in GitHub Desktop.
commands-secret.txt
This file contains hidden or 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
git clone https://[email protected]/bgoonz/nextjs-vercel.git | |
https://nextjs-vercel-lemon-seven.vercel.app/ | |
vercel hook for blog2.0 | |
https://api.vercel.com/v1/integrations/deploy/prj_mPjCoAX7XWfoFV6ixQ2Yu8A94igG/JFy2HWhjjq | |
qprvb7sykcwyhuwml4qe3tmull6azc4figwitrq7povqcsaw6joa | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta http-equiv="Content-Type" content="text/html; charset = UTF-8"> | |
<meta http-equiv="Content-Type" content="text/html"> | |
<meta name="Author" content="Bryan Guner"> | |
<meta name="keywords" content="HTML, Meta Tags, Metadata"> | |
<meta name="description" content="Learning about Web Development."> | |
<meta name="revised" content="Bryan Guner 4/16/2021"> | |
<meta http-equiv="cookie" content="userid = xyz; expires = Wednesday, 20-05-22 23:59:59 GMT;"> | |
<title> Lambda Student Resources</title> | |
<link type="image/x-icon" href="./favicon.ico" rel="shortcut icon"> | |
<link | |
href="https://instructure-uploads-pdx.s3.us-west-2.amazonaws.com/account_168550000000000001/attachments/537/logo-canvas.png" | |
rel="apple-touch-icon"> | |
<link type="text/css" href="https://fonts.googleapis.com/css?family=Raleway:200,100,400" rel="stylesheet"> | |
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="./css/main-style.css" rel="stylesheet"> | |
<link href="./css/stars.css" rel="stylesheet"> | |
<script src="https://code.jquery.com/jquery-3.6.0.min.js" | |
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> | |
<script src="./js/stats.min.js" async defer></script> | |
<script src="./js/index.js" async></script> | |
<!--do not use async defer on this script... it affects the animated title--> | |
<!----------------------jQuery-------------------------------------------------------------------------------------------> | |
<!-- <script async defer src="./jQuery-min.js"></script> --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" async defer></script> | |
<script type="text/javascript"> | |
function hideLoader() { | |
$( '#loading' ).hide(); | |
} | |
$( window ).ready( hideLoader ); | |
// Strongly recommended: Hide loader after 20 seconds, even if the page hasn't finished loading | |
setTimeout( hideLoader, 10 * 1000 ); | |
$( window ).on( 'beforeunload', function () { | |
$( window ).scrollTop( 0 ); | |
} ); | |
</script> | |
<!-------------------------------------Angolia Search----------------------------------------------------------------------------------------------------------------------------------> | |
<link href="https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@1/dist/algoliasearchNetlify.css" | |
rel="stylesheet"> | |
<script src="https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@1/dist/algoliasearchNetlify.js" | |
type="text/javascript"></script> | |
<script type="text/javascript"> | |
algoliasearchNetlify( { | |
appId: '5UFU8H2XQ2', | |
apiKey: '3882cac807db103c3bbd02d853d9e785', | |
siteId: '0a9e6d86-b295-4037-b04d-88da85c1f6b5', | |
branch: 'master', | |
selector: 'div#search', | |
} ); | |
</script> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<style> | |
@media screen and (min-width: 40em) { | |
article { | |
display: grid; | |
grid-template-columns: 3fr 1fr; | |
column-gap: 20px; | |
} | |
@media screen and (max-width: 1680px) { | |
html { | |
font-size: 12pt; | |
} | |
} | |
@media screen and (max-width: 1280px) { | |
html { | |
font-size: 11pt; | |
} | |
} | |
@media screen and (max-width: 360px) { | |
html { | |
font-size: 10pt; | |
} | |
} | |
</style> | |
<link href="./css/toc.css" rel="stylesheet"> | |
<script src="./js/toc.js" async defer></script> | |
</head> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<body> | |
<div id="stars"></div> | |
<div class="wrapper"> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<div id="out"> | |
<!--------------------------------------------------------------Github Corner SVG---------------------------------------------------------------------------------------------------------> | |
<a class="github-corner" href="https://github.com/bgoonz/Lambda" aria-label="View source on Github"><svg | |
aria-hidden="true" width="80" height="80" viewBox="0 0 250 250" | |
style="z-index: 100000; fill:#194ccdaf; color:#fff; position: fixed; top: 20px; border: 0; left: 20px; transform: scale(-1.5, 1.5);"> | |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | |
<path class="octo-arm" | |
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" | |
fill="currentColor" style="transform-origin: 130px 106px;"></path> | |
<path class="octo-body" | |
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" | |
fill="currentColor"></path> | |
</svg></a> | |
<!------------------------------------------------Top Bar-----------------------------------------------------------------------------------------------------> | |
<!------------------------------------------------Top Bar-----------------------------------------------------------------------------------------------------> | |
<h5></h5> | |
<div class="my_class" id="ToC"> </div> | |
<!---------------------------------------------------------Animated Title----------------------------------------------------------------------------------------> | |
<h1 style="color:rgb(84, 172, 226); align-content:center;">This is: | |
<span class="txt-rotate" data-period="2000" data-rotate="[ " Lambda Student | |
Resources", "created by Bryan Guner" ]"></span> | |
</h1> | |
<!-------------------------------------------------Background Image----------------------------------------------------------------------------------------------------------------------> | |
<div id="loading" | |
style="background: url('./media-gifs-images/giphy.gif') no-repeat center center;position: absolute;top: 0;left: 0;height: 100%;width: 100%;z-index: 9999999;"> | |
</div> | |
<!----------------------------------------------Mute------------------------------------------------------------------------------------------------------------------------> | |
<button id="myBtn" | |
style="background-color:rgb(255, 0, 0); color:white;font-weight:900;border-radius: 10px;box-shadow: 6px solid #fff;" | |
onclick="removeaudio()">Mute!</button> | |
<!----------------------------------------------One Drive File Storage-------------------------------------------------------------------------------------------------------------------------> | |
<br> | |
<div class="embed" id="search"></div> | |
<div class="loading-overlay"></div> | |
<div class="loading-overlay-image-container"> | |
<img class="loading-overlay-img" src="./giphy.gif"> | |
</div> | |
<br> | |
<br> | |
<!-----------------------------------------------------------One Drive-----------------------------------------------------------------------------------------------------------> | |
<h2>One-Drive-File-Storage!</h2> | |
<div style="display:flex; flex-direction: row;"> | |
<br> | |
<iframe class="embed" | |
src="https://onedrive.live.com/embed?cid=D21009FDD967A241&resid=D21009FDD967A241%21538729&authkey=AHSDSyoYqzg2K2E" | |
loading="lazy" width="165" height="128" frameborder="0" scrolling="no"></iframe> | |
</div> | |
<!------------------------------------------------------------Spotify Embed-----------------------------------------------------------------------------------------------------------> | |
<br> | |
<h2>Listen to music while you study!</h2> | |
<iframe class="embed" src="https://open.spotify.com/embed/playlist/2VojZ70yfWaSeVfY2gjwVC" loading="lazy" | |
width="400" height="300" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe> | |
<br> | |
<!-----------------------------------------------------Links------------------------------------------------------------------------------------------------------------------> | |
<div class="embed"> | |
<br> | |
<br> | |
<ul style="max-width:725px ;"> | |
<li class="btn"><a href="./directory.html">🧭NAVIGATION🧭 </a></li> | |
<li class="btn"><a href="./link.html">🧭External Links (most used websites)🧭 </a></li> | |
<li class="btn"><a href="">Books </a> | |
</li> | |
<li class="btn"><a href="./7-assets/web-dev-utils/lambda-prep/directory.html">🧰Tools🔨 </a></li> | |
<li class="btn"><a href="https://lambda-prep.netlify.app/">📖Lambda Prep-Resource Site📗 </a></li> | |
<li class="btn"><a href="https://code-playground.netlify.app/">🖥️Code Playground🖲️ </a></li> | |
<li class="btn"><a href="./WEEKS/wk1/0-notes/d2/applied-js-1.html">✨applied-js-1.html✨ </a></li> | |
<li class="btn"><a href="./WEEKS/wk1/0-notes/d2/HTML_PATTERNS">🧱HTML_PATTERNS🕸️ </a></li> | |
<li class="btn"><a href="./WEEKS/wk1/0-notes/d2/js-fundamentals.html">✨js-fundamentals✨ </a></li> | |
<li class="btn"><a href="./WEEKS/wk1/0-notes/d2/using-git.html">😺using-git😺 </a></li> | |
<li class="btn"><a href="https://trusting-dijkstra-4d3b17.netlify.app/">🎄DATA STRUCTURES🌐 </a></li> | |
<li class="btn"><a href="./WEEKS\wk1\2-resources\agenda.html">📗Agenda📗 </a></li> | |
<li class="btn"><a href="./WEEKS\wk1\2-resources\agenda.html">📼Video Previewer📹 </a></li> | |
<li class="btn"><a href="./about\Using_Canvas.html">📊Using Canvas📊 </a></li> | |
<li class="btn"><a href="./6-about/BritHemmingCodePen.html">🖋️Brit's Code Pens✏️ </a></li> | |
<li class="btn"><a href="2-resources/__CHEAT-SHEETS/right.html">Cheat Sheets </a></li> | |
<li class="btn"><a href="./networking.html">Networking </a></li> | |
<li class="btn"><a | |
href="https://www.notion.so/0c25ca36d2184ea2b7f2aad2e44f7628?v=940dee8552a5455f8f6abf4c270aec57">ToDo </a> | |
</li> | |
</ul> | |
</div> | |
<!----------------------------------------------------------------------------------Top Animations-----------------------------------------------------------------> | |
<br> | |
<br> | |
<center> | |
<div class="embed" | |
style="background:url(https://media3.giphy.com/media/3o7qDNfxtNRtLVv8qs/source.gif)!important; align-content: center; justify-content: center; margin: auto;display:flex; flex-direction: row;"> | |
<iframe class="animate embed" id="ann" src="https://embedable-content.netlify.app/standalone/test.html" | |
loading="lazy" height="365" style="width: 8%;" scrolling="no" frameborder="yes" border-radius:350 | |
align-content:center allowtransparency="true" allowfullscreen="true" opacity="0.7" | |
box-shaddow="16px white"></iframe> | |
<button id="myBtn" style="background-color:rgb(255, 0, 0); color:white;font-weight:900;" | |
onclick="removeaudio()">Mute!</button> | |
<iframe class="animate embed" id="audio" | |
src="https://project-showcase-bgoonz.netlify.app/future-tech-innov-creative/etc/musicviz/index_forexample.html" | |
loading="lazy" height="365" style="width: 8%;" scrolling="no" frameborder="yes" border-radius:350 | |
allow="autoplay" align-content:center allowtransparency="true" allowfullscreen="true" opacity="0.7" | |
box-shaddow="16px white"></iframe> | |
</div> | |
</center> | |
<!---------------------------------------------------------Transition Gif------------------------------------------------------------------------------------------> | |
<br> | |
<br> | |
<br> | |
<br> | |
<center> | |
<img class="embed" src="./fireworks.gif" loading="lazy" height="365" style="width:1050px;" scrolling="no" | |
frameborder="yes" allowtransparency="true" allowfullscreen="true" opacity="0.7" box-shaddow="16px white"> | |
</center> | |
<!---------------------------------------------------------Announcments------------------------------------------------------------------------------------------> | |
<br> | |
<br> | |
<h2 style="color:white; align-content:center;"> Announcements </h2> | |
<iframe class="embed" src="./anouncments.html" height="800" style="width:90%" scrolling="yes" frameborder="no" | |
loading="lazy" allowtransparency="true" allowfullscreen="true" opacity="0.7" box-shaddow="8px white"></iframe> | |
<br> | |
<br> | |
<!--------------------------------------------------------Week 2 Review------------------------------------------------------------------------------------------> | |
<h2 style="color:white; align-content:center;"> Week 2 Review</h2> | |
<br> | |
<br> | |
<iframe class="embed" src="./WEEKS/wk2/4-test-prep/Study-Guides/Sprint-2-study-guide.html" loading="lazy" | |
style="width:90%!important; height:800px;background-color: whitesmoke;zoom:1.7;"></iframe> | |
<br> | |
<br> | |
<h2 style="color:white; align-content:center;"> How To Win Friends And Influence People</h2> | |
<iframe class="embed" src="./2-resources/How-To-Win-Friends-Influence-People.pdf" loading="lazy" | |
style="width:90%!important; height:800px;background-color: whitesmoke;zoom:1.7;"></iframe> | |
<br> | |
<br> | |
<!--------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!--------------------------------------------------------Web Dev-Quizes------------------------------------------------------------------------------------------> | |
<h2 style="color:white; align-content:center;">Web Dev Quizes</h2> | |
<br> | |
<br> | |
<iframe class="embed" src="https://web-dev-interview-prep-quiz-website.netlify.app/" loading="lazy" | |
style="width:90%!important; height:800px;"></iframe> | |
<br> | |
<br> | |
<!--------------------------------------------------------------------------------------------------------------------------------------------------> | |
<!---------------------------------------------------------Mock Interview----------------------------------------------------------------------------------------------------------------------------------> | |
<h2 style="color:white; align-content:center;"> Interview</h2> | |
<br> | |
<br> | |
<iframe class="embed" src="./7-assets/from-class/web-interview.pdf" loading="lazy" | |
style="width:90%!important; height:800px;"></iframe> | |
<!-----------------------------------------------------------Resources------------------------------------------------------------------------------> | |
<!---------------------------------------------------------Many Quizes------------------------------------------------------------------------------------------> | |
<h2 style="color:white; align-content:center;"> All Topics Quiz</h2> | |
<br> | |
<br> | |
<iframe class="embed" src="./2-resources/_GENERAL-RESOURCES/Skills-Quiz/_HTML/Merged.html" loading="lazy" | |
style="width:90%!important; height:800px;"></iframe> | |
<!-----------------------------------------------------------Resources------------------------------------------------------------------------------> | |
<br> | |
<br> | |
<h2> General Resources:</h2> | |
<iframe class="embed" src="./RESOURCES.html" height="800" style="width:90%;!important" scrolling="yes" | |
frameborder="no" loading="lazy"></iframe> | |
<br> | |
<!-----------------------------------------------------Javascript------------------------------------------------------------------------------------> | |
<br> | |
<h2> Javascript Resources</h2> | |
<iframe class="embed" src="./Javascript-resources.html" loading="lazy" height="800" style="width:90%;!important" | |
scrolling="yes" frameborder="no"></iframe> | |
<br> | |
<!---------------------------------------------------------------------------------------------------------------------------------------> | |
<!-----------------------------------------------------Slack------------------------------------------------------------------------------------> | |
<br> | |
<h2>Slack</h2> | |
<iframe class="embed" src="./Slack.html" loading="lazy" height="800" style="width:90%;!important" | |
scrolling="yes" frameborder="no"></iframe> | |
<br> | |
<!------------------------------------------------------Demos-----------------------------------------------------------------------------------> | |
<h2>Demo's</h2> | |
<br> | |
<iframe class="embed" id="content" src="./lightshow-background.html" loading="lazy" | |
style="width:90%!important; height:800px;overflow-y:hidden; zoom:0.5; display:inline-flexbox;"></iframe> | |
<br> | |
<iframe class="embed" src="https://embedable-content.netlify.app/main.html" loading="lazy" | |
style="width:90%!important; height:800px;"></iframe> | |
<br> | |
<br> | |
<!-----------------------------------------Comments-------------------------------------------------> | |
<h2>Comments</h2> | |
<iframe class="embed" src="https://Comments.bgoonz.repl.co" loading="lazy" | |
style="background-color: rgba(255, 255, 255, 0.214) ;border-radius:45px; color:white;!important" | |
height="800px" width="90%" scrolling="yes" frameborder="yes" allowtransparency="false" scroll="true" | |
allowfullscreen="true"></iframe> | |
<!-----------------------------------------------------------------------------------------------------------------------------------------> | |
<button id="scrollBtn" title="Go to top" onclick="topFunction()">Back To Top</button> | |
<br> | |
<br> | |
<button id="myBtn" style="background-color:rgb(255, 0, 0); color:white;font-weight:900;" | |
onclick="removeaudio()">Mute!</button> | |
<!---------------------------------------------Clock nd Time Zone Widget-----------------------------------------> | |
<iframe class="animate" id="hexload" | |
src="https://codepen.io/bgoonz/embed/ExZxMPN?height=265&theme-id=dark&default-tab=result" loading="lazy" | |
height="400px" width="90%" " scrolling=" no" frameborder="yes" border-radius:85px; align-content:center | |
allowtransparency="true" allowfullscreen="true" opacity="0.7" box-shaddow="16px white"></iframe> | |
<div class="shadow"> | |
<br> | |
<br> | |
<!-----------------------------------------------------Time Zone ---------------------------------------------------------------> | |
</div> | |
<br> | |
<br> | |
<hr> | |
<center> | |
<h2 style="align-self:center;">World Clock(Click To See Localized Time)</h2> | |
</center> | |
<iframe src="https://observablehq.com/embed/1b6399182c98cd36@480?cells=chart%2Cviewof+date" loading="lazy" | |
width="90%" height="629" frameborder="0"></iframe> | |
<!-----------------------------------------------Bottom Nav--------------------------------------------------------> | |
</div> | |
<br> | |
<br> | |
<li class="btn"><a href="./WEEKS/wk1/0-notes/d2/directory.html">🧭NAVIGATION🧭 </a></li> | |
<li class="btn"><a href="https://elastic-franklin-ce3a55.netlify.app/" target="_blank">ABOUT </a> | |
</li> | |
<li class="btn"> <a href="https://lambda-w-1-notes.netlify.app/" target="_blank">🏠HOME! </a> | |
</li> | |
<br> | |
<br> | |
<!----------------------------------------------------Bookmark and Visit Counter---------------------------------------------------> | |
<a class="bookmarklet_button" href="javascript:(function(){ | |
f='https://www.addtoany.com/share#url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title); | |
a=function(){ | |
if(!window.open(f,'addtoany','width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes')){ | |
location.href=f+'jump=yes'; | |
}; | |
if(/Firefox/.test(navigator.userAgent)){ | |
setTimeout(a,0) | |
} | |
else{ | |
a() | |
} | |
})()" title="AddToAny" onclick="alert('Drag this link onto your toolbar to add the AddToAny Bookmarklet'); | |
return false"> | |
Drag to Bookmarks to add to Bookmarks! | |
</a> | |
<br> | |
<br> | |
<script src="https://www.freevisitorcounters.com/auth.php?id=fdf7005310189aaad83125635a22c042daac8a70" | |
type="text/javascript"></script> | |
<script src="https://www.freevisitorcounters.com/en/home/counter/814984/t/0" type="text/javascript" async> | |
</script> | |
<!----------------------------------------------------Remove audio I frame script---------------------------------------------------> | |
<script> | |
function removeaudio() { | |
let elem = document.getElementById( 'audio' ); | |
elem.parentNode.removeChild( elem ); | |
return false; | |
}; | |
function pageInit() { | |
// Hook up the "remove audio" button | |
let btn = document.getElementById( 'btnRemoveaudio' ); | |
if ( btn.addEventListener ) { | |
// DOM2 standard | |
btn.addEventListener( 'click', removeaudio, false ); | |
} else if ( btn.attachEvent ) { | |
// IE (IE9 finally supports the above, though) | |
btn.attachEvent( 'onclick', removeaudio ); | |
} else { | |
// Really old or non-standard browser, try DOM0 | |
btn.onclick = removeaudio; | |
} | |
}; | |
</script> | |
<a href="https://free-hit-counters.net/" style="color:black;">Free Hit Counters</a> | |
<script src="https://www.freevisitorcounters.com/auth.php?id=f904dfc58ec6c182f5b6f3c4144fb84f03f356bc" | |
type="text/javascript"></script> | |
<script src="https://www.freevisitorcounters.com/en/home/counter/815451/t/0" type="text/javascript"></script> | |
<!-------------------------------------------------------------------------------------------------------> | |
<!-------------------------------------------Back To Top Button----------------------------------------------------> | |
<script> | |
//Get the button: | |
mybutton = document.getElementById( "scrollBtn" ); | |
// When the user scrolls down 20px from the top of the document, show the button | |
window.onscroll = function () { | |
scrollFunction() | |
}; | |
function scrollFunction() { | |
if ( document.body.scrollTop > 20 || document.documentElement.scrollTop > 20 ) { | |
mybutton.style.display = "block"; | |
} else { | |
mybutton.style.display = "none"; | |
} | |
}; | |
// When the user clicks on the button, scroll to the top of the document | |
function topFunction() { | |
document.body.scrollTop = 0; // For Safari | |
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera | |
}; | |
</script> | |
<script> | |
window.addEventListener( 'DOMContentLoaded', ( event ) => { | |
console.log( 'DOM fully loaded and parsed' ); | |
const scrollToTop = () => { | |
const c = document.documentElement.scrollTop || document.body.scrollTop; | |
if ( c > 0 ) { | |
window.requestAnimationFrame( scrollToTop ); | |
window.scrollTo( 0, c - c / 8 ); | |
} | |
}; | |
scrollToTop(); | |
} ); | |
</script> | |
<br> | |
<br> | |
<!-------------------------------------Random Script Inclusions----------------------------------------------------------------> | |
<script> | |
muteBtn.attachEvent( 'OnClick', removeaudio() ); | |
</script> | |
<!---------------------------------------------------Footer------------------------------------------------------------------------------> | |
<!-----------------------------------------------------------------------------------------------------> | |
<iframe id="footer" src="https://nervous-spence-2c9965.netlify.app/" loading="lazy" frameborder="0" scrolling="no" | |
border:none; style="zoom:0.8; heght:1100; width :100% !important;"></iframe> | |
</div> | |
</body> | |
</html> | |
google cloud platform | |
637523676298-jv3rbgf3igi85j3uu3feoh8gmmehaled.apps.googleusercontent.com | |
iItbGpqZyaImW9ge8Sn9z9Mb | |
contentful: | |
CFPAT-bnvFirG3EAYIP-IgfuCvYy7OuxzjlkYshljk3C73-5w | |
NEWSAPI | |
01cfd6d4dd444701b18c095ec5c354d1 | |
<div id="fb-root"></div> | |
<br> | |
<br> | |
<br> | |
<hr> | |
<br> | |
<br> | |
<br> | |
<fb:login-button | |
scope="public_profile,email" | |
onlogin="checkLoginState();"> | |
</fb:login-button> | |
<br> | |
<br> | |
<br> | |
<hr> | |
<br> | |
<br> | |
<br> | |
<div | |
class="fb-like" | |
data-share="true" | |
data-width="450" | |
data-show-faces="true"> | |
</div> | |
<div class="fb-page" data-href="https://www.facebook.com/Webdevresourcehub-blog-103884128414320" data-tabs="timeline" data-width="500" data-height="600" data-small-header="true" data-adapt-container-width="false" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/Webdevresourcehub-blog-103884128414320" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/Webdevresourcehub-blog-103884128414320">Webdevresourcehub-blog</a></blockquote></div> | |
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v12.0&appId=951130702132399&autoLogAppEvents=1" nonce="Spol7MAC"></script> | |
6dbcb-5640b6078b-1a1180d746-953ddad47d-29812eb2e1-756281d5ac-2e1d264b7f-c6eac8e319-0f414dfde0-a8e4b88f49-a864146aec-92c03956b3-a979c2c40d-339723130f-d9ca78beec-0e53a0d97d-03982 | |
<a id="rocket" href="#top" class="show"></a> | |
<script> | |
$(window).scroll(function() { | |
$(window).scrollTop() > 500 ? $("#rocket").addClass("show") : $("#rocket").removeClass("show"); | |
}); | |
$("#rocket").click(function() { | |
$("#rocket").addClass("launch"); | |
$("html, body").animate({ | |
scrollTop: 0 | |
}, 500, function() { | |
$("#rocket").removeClass("show launch"); | |
}); | |
return false; | |
}); | |
</script> | |
https://techinterviewhandbook.org/algorithms/array/ | |
https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/24e20dnMC1IBKem2rAzi/ds_algo_prac/interview-questions. | |
https://app.gitbook.com/s/TN1g7AHGrcAvsuhBRdr7/c/24e20dnMC1IBKem2rAzi/#https-bryan-guner.gitbook.io-job-search | |
https://bryan-guner.gitbook.io/job-search/ | |
https://github.com/poteto/hiring-without-whiteboards | |
https://bgoonz-blog.netlify.app/docs/career/dev-interview/ | |
https://bgoonz-blog.netlify.app/docs/career/interview-dos-n-donts/ | |
https://gist.github.com/bgoonz/d21b5da0c77537718e8a57f81fce8722 | |
https://github.com/bgoonz/pdf-readings/tree/master/JavaScript | |
Bryan-Guner-Backup | |
DanHefrman | |
RelativeTech | |
bgoonz | |
bryan-guner | |
[email protected] | |
[email protected] | |
[email protected] | |
https://cdpn.io/bgoonz/fullpage/zYwRKxP | |
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 "*.xml" -type f -print | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
youtube-dl https://www.youtube.com/user/Mihirishere/videos | |
--------------------------------------------------------------------------------------------------------- | |
Remove duplicate lines from a text file | |
You can use this shell command: | |
COPY | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
httrack --ext-depth=3 https://www.textfixer.com/html/convert-url-to-html-link.php | |
httrack http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html -O "./temp" %e5 | |
httrack --ext-depth=4 http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html | |
httrack --ext-depth=4 https://www.vickielasher.com/ | |
--------------------------------------------------------------------------------------------------------- | |
grab all links from website | |
lynx -dump https://distrokid.com/hyperfollow/mihirbeg/getting-there | awk '/http/{print $2}' > links2.txt | |
lynx -dump https://geeksforgeeks.org/top-10-useful-github-repos-that-every-developer-should-follow | awk '/http/{print $2}' > links.md | |
lynx -dump https://html.com/blog/100-web-development-cheat-sheets | awk '/http/{print $2}' > links.md | |
wget -qO- www.instagram.com/mihirbeg/ | | |
grep -Eoi '<a [^>]+>' | | |
grep -Eo 'href="[^\"]+"' | | |
grep -Eo '(http|https)://[^/"]+'>output.md | |
--------------------------------------------------------------------------------------------------------- | |
.*(?<=<script)(.*)(?=<\/script>).* | |
.*\./\.git.* | |
.*node_modules.* | |
find . -name "*.zip" -type f -print | |
find . -name "*.zip" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
REMOVE DUPLICATE LINES: | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
2.)find and delete all empty directories()===> | |
find . -empty -type d -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
3.)Find and delete all empty files()===> | |
find . -empty -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
4.)Recursive-unzip:()===> | |
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 . -name "*.gz" -type f -print -delete | |
find . -name "*.tgz" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
add extension to every file in folder | |
for f in * ; do | |
mv "$f" "$f.html" | |
done | |
find . -type f -exec mv '{}' '{}'.html \; | |
for f in * ; do | |
mv "$f" "$f.css" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
delete lines contaning specific string: | |
sed -i '/normalizerEmpty/d' ./js-in-one-page.html | |
sed -i '/\.git/d' ./index.html | |
2 | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" \) -a -exec sed -i '/Copyright/d' '{}' + | |
sed -i '/Copyright/d' ./*.html | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" -o -name "*.php" \) -a -exec sed -i '/MIT/d' '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
Remove lines of file contaning a string | |
sudo sed -i '/\.git/d' ./index.html | |
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' | |
--------------------------------------------------------------------------------------------------------- | |
print out the path of every file recursivley | |
ls -R './' | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }'>listing.md | |
--------------------------------------------------------------------------------------------------------- | |
DO a command once for every file in folder | |
rename 's/\.coffee$/.html/' *.coffee | |
for file in *. | |
do | |
rename 's/\.coffee$/.html/' *.coffee | |
done | |
for file in *. | |
do | |
rename 's/\.coffee$/.html/' *.coffee | |
done | |
for file in *. | |
do | |
sed '/Mirrored from/d' "$file" > "$file".new_file.html | |
done | |
--------------------------------------------------------------------------------------------------------- | |
sed -n -e '/<script>/,/<\/script>/p' getting-there.html >out.js | |
sed -i 's/<script>//g' out.js | |
sed -i 's/<\/script>//g' out.js | |
.*\./<script* | |
(?<=<script)(.*)(?=<\/script>) | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/\.git/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Resursivley delete node modules | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '\.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
5.) Remember Git Credentials: | |
git config --global credential.helper store | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CONTRIBUTING.md" \) -exec rm -rf -- {} + | |
find . \( -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.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 -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_website-components/0-DOJO/widgets-master/output/info/stats.json' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_00-4-all-time/_0-Random-Repo/zipped.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
nano | |
When you're done, hit CTRL+O to save and CTRL+X to exit Nano. You'll just need to restart the SSH server with one of the following commands. | |
$ systemctl restart sshd | |
$ service sshd restart | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley Create numbered folders: | |
n=1; | |
max=50; | |
while [ "$n" -le "$max" ]; do | |
mkdir "s$n" | |
n=`expr "$n" + 1`; | |
done | |
--------------------------------------------------------------------------------------------------------- | |
Command Line: Rename all files in current directory to a certain file extension: | |
forfiles /S /M * /C "cmd /c rename @file @fname.js" | |
forfiles /S /M * /C "cmd /c rename @file @fname.html" | |
--------------------------------------------------------------------------------------------------------- | |
The following command would rename all *.txt files to *.doc. | |
$ rename 's/\.txt$/.doc/' *.txt | |
$ rename 's/\.example$/.sql/' *.example | |
rename 's/\.js\.download$/.js/' *.js\.download | |
rename 's/\.html\.tmp$/.html/' *.html\.tmp | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -o "${0%.md}.html"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley list every single file in the working directory... 1 per line: | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
write-to-txt-file | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
--------for only html-files------------------------------------------------------------------------------ | |
find ./ | grep -i "\.html*$" | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
forfiles /S /M *.File /C "cmd /c rename @file @fname.js" | |
--------------------------------------------------------------------------------------------------------- | |
Recreate folder structure with only specific file types | |
find . -type f -name '*.html' | cpio -p -d -v './../../../' | |
find . -type f -name '*.png' | cpio -p -d -v './_ext' | |
find . -name '*.README.md' | cpio -pdm './extension-readme' | |
find . -name '*.git' | cpio -pdm './GIT-FOLDERS' | |
--------------------------------------------------------------------------------------------------------- | |
7.) ()===> | |
--------------------------------------------------------------------------------------------------------- | |
8.) Command Prompt: code --list-extensions | |
for /F "tokens=*" %A in (extensions.list) do code --install-extension %A | |
--------------------------------------------------------------------------------------------------------- | |
9.)Create a soft link in the home dir | |
ln -s /mnt/c/0-a-A-October | |
--------------------------------------------------------------------------------------------------------- | |
10.) | |
sudo apt update | |
sudo apt upgrade | |
git config --global user.name bryan | |
git config --global user.email [email protected] | |
sudo apt update | |
sudo apt install build-essential | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
. ./.bashrc | |
nvm install --lts | |
sudo apt install unzip | |
npm install -g mocha | |
npm audit fix -F | |
npm audit fix -f | |
npm install -g mocha | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install python3 | |
----------------------------------------------------------------------------------------------------------- | |
Command Line vscode | |
code --list-extensions | |
code --disable-extension <ext-name> | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
dockerd | |
----------------------------------------------------------------------------------------------------------- | |
killall node | |
----------------------------------------------------------------------------------------------------------- | |
sudo service postgresql stop | |
sudo service postgresql start | |
sudo service postgresql restart | |
sudo -u postgres psql | |
---------------------------------------- | |
sed -e '/.git/ { | |
$!N | |
d | |
}'index.html | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. | |
--restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
--domains yoursite.com \ # Do not follow links outside this domain. | |
--no-parent \ # Don't follow links outside the directory you pass in. | |
https://www.instagram.com/mihirbeg/?hl=en | |
----------------------------------------------------------------------------------------------------------- | |
pandoc *.md> -o _EXTENSIONS.html | |
Copy file structure without the files: | |
rsync -a -f"+ */" -f"- *" './'/ './../'/ | |
rsync -a -f"+ */" -f"- *" source/ destination/ | |
----------------------------------------------------------------------------------------------------------- | |
cat *.html > node-mod-readme.html | |
----------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
#################### continue with the HTML stuff: | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
rm -f files | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.go/d' ./index.html | |
sudo sed -i '/\.vue/d' ./index.html | |
sed -i "" "s/.git/d" index.html | |
sed -i "" "s/.git/d" ./index.html | |
sed -i "" "s/.git/d" './index.html' | |
sed -i "./" "s/.git/d" 'index.html' | |
sed -i "./" "s/.git/d" index.html | |
sed -i "./" "s/\.git/d" index.html | |
sed -i "./" "s/\.git/d" ./index.html | |
sed '/.git/d' ./index.html | |
sed '/\.git/d' ./index.html | |
sed -i '/\.git/d' ./index.html | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/images/d' ./index.html | |
sudo sed -i '/font/d' ./index.html | |
sudo sed -i '/fonts/d' ./index.html | |
sudo sed -i '/\.TTF/d' ./index.html | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
----------------------------------------------------------------------------------------------------------- | |
<pre><code> | |
#!/bin/bash | |
link="#insert url here#" | |
#links were a set of strings with just the index of the video as the variable | |
num=3 | |
#first video was numbered 3 - weird. | |
ext=".mp4" | |
while [ $num -le 66 ] | |
do | |
wget $link$num$ext -P ~/Downloads/ | |
num=$(($num+1)) | |
done | |
</code></pre> | |
----------------------------------------------------------------------------------------------------------- | |
print a dummy text file in each folder | |
for x in "./"/*/; do | |
(cd "$x" | |
files=(*) | |
printf '%s\n' "${files[@]}" > deleteme.txt | |
) | |
done | |
----------------------------------------------------------------------------------------------------------- | |
download all links of given file type | |
wget -r -A.pdf https://overapi.com/git | |
----------------------------------------------------------------------------------------------------------- | |
for file in *. | |
do | |
sudo sed -i '/Copyright/d' ./*.html | |
done | |
sudo sed -i '/Support/d' ./*.html | |
sudo sed -i '/MIT/d' ./*.html | |
sudo sed -i '/License/d' ./*.html | |
sudo sed -i '/Contributors/d' ./*.html | |
sudo sed -i '/Copyright/d' ./*.html | |
sudo sed -i '/copyright/d' ./*.html | |
sudo sed -i '/Copyright © /d' ./*.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Remove any lines not contaning string text or blah | |
sudo sed -i '/\.html/!d' scrap.md | |
sudo sed -i '/CODE-MIRROR/d' ./resources.html | |
sudo sed -i '/\.html/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Delete Files Over certain Size: | |
find . -size +75M -a -print -a -exec rm -f {} \; | |
--------------------------------------------------------------------------------------------------------- | |
Add text to the first line of every file of a certain extension in a given folder. | |
for f in *.txt; do printf '%s\n' 0a 'TEXT YOU WISH TO APPEND TO BEGINNING OF EVERY FILE' . x | ex "$f"; done | |
for d in ./* | |
do ( cd "$d" && find ./ -iname "*.html" -type f -exec 'echo "</body></html>'" {} \; <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><body>' . x | ex "$f"; done) | |
done | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>' . x | ex "$f"; done | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
------------------------------------------------------How to add to end of file:------------------------------------------------------ | |
echo "</body></html>" | tee -a *.html | |
find ./* -type d -exec 'echo "</body></html>" | tee -a *.html' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
Recursive NPM install: | |
Usage | |
$ npm-recursive-install | |
--------------------------------------------------------------------------------------------------------- | |
for filename in *mesibo*; do echo mv \"$filename\" \"${filename//mesibo/zumzi}\"; done > rename.md | |
for filename in *mesibo*; do mv "$filename" "${filename//mesibo/zumzi}"; done | |
for d in */ ; do | |
echo "$d" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
<form action="https://liveformhq.com/form/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5" method="POST" accept-charset="utf-8"> | |
<input type="hidden" name="_utf8" value="✓"> | |
<!-- | |
NOTE: This is an optional field, if your form has a field named '_redirect', | |
The user will be redirected to this page after the submission is saved | |
--> | |
<input type="hidden" value="https://liveformhq.com/thank_you" name="_redirect" /> | |
<label for="name">Name</label> | |
<input type="text" id="name" name="name"> <br /> | |
<label for="email">Email</label> | |
<input type="text" id="email" name="email"> <br /> | |
<button type="submit">Submit</button> | |
</form> | |
--------------------------------------------------------------------------------------------------------- | |
Input Output error | |
wsl.exe --shutdown then Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
Replace the string source with target in all files in the current directory and all sub-directories: | |
find . -type f -exec rename 's/source/target/' {} \; | |
Replace the string source with target in all directories in the current directory and all sub-directories: | |
find . -type d -exec rename 's/source/target/' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
I use this one-liner to remove invalid characters in subtitle files: | |
for f in *.srt; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
Only process *.srt files( * could be used in place of *.srt to process every file) | |
Removes all other characters except for letters A-Za-z, numbers 0-9, periods ".", and dash's "-" | |
Removes possible double or triple periods | |
Checks to see if the file name needs changing | |
If true, it renames the file with the mv command, then outputs the changes it made with the echo command | |
It works to normalize directory names of movies: | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.]/./g' -e 's/\.\.\././g' -e 's/\.\././g' -e 's/\.*$//'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.]/'-'/g' -e 's/\.\.\././g' -e 's/\.\././g' -e 's/\.*$//'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
--------------------------------------------------------------------------------------------------------- | |
To remove any number of trailing spaces from file names you can use rename (prename) : | |
rename 's/ *$//' * | |
--------------------------------------------------------------------------------------------------------- | |
This shell script sanitizes a directory recursively, to make files portable between Linux/Windows and FAT/NTFS/exFAT. It removes control characters, /:*?"<>\| and some reserved Windows names like COM0. | |
sanitize() { | |
shopt -s extglob; | |
filename=$(basename "$1") | |
directory=$(dirname "$1") | |
filename_clean=$(echo "$filename" | sed -e 's/[\\/:\*\?"<>\|\x01-\x1F\x7F]//g' -e 's/^\(nul\|prn\|con\|lpt[0-9]\|com[0-9]\|aux\)\(\.\|$\)//i' -e 's/^\.*$//' -e 's/^$/NONAME/') | |
if (test "$filename" != "$filename_clean") | |
then | |
mv -v "$1" "$directory/$filename_clean" | |
fi | |
} | |
export -f sanitize | |
sanitize_dir() { | |
find "$1" -depth -exec bash -c 'sanitize "$0"' {} \; | |
} | |
sanitize_dir '/path/to/somewhere' | |
----------------------------------------- | |
find some/dir -type f -execdir pwd && #!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
#################### continue with the HTML stuff: | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
{} \; | |
<meta property="og:image" content="https://mugshotbot.com/m/DROicc16"> | |
<meta property="twitter:card" content="summary_large_image"> | |
<!-- HTML Meta Tags --> | |
<title>Web-Dev-Hub</title> | |
<meta name="description" content="my resource sharing and blog site ... centered mostly on web development and just a bit of audio production / generally nerdy things I find interesting."> | |
<!-- Facebook Meta Tags --> | |
<meta property="og:url" content="https://bgoonz-blog.netlify.app/"> | |
<meta property="og:type" content="website"> | |
<meta property="og:title" content="Web-Dev-Hub"> | |
<meta property="og:description" content="my resource sharing and blog site ... centered mostly on web development and just a bit of audio production / generally nerdy things I find interesting."> | |
<meta property="og:image" content="https://bgoonz-blog.netlify.app/images/code.png"> | |
<!-- Twitter Meta Tags --> | |
<meta name="twitter:card" content="summary_large_image"> | |
<meta property="twitter:domain" content="bgoonz-blog.netlify.app"> | |
<meta property="twitter:url" content="https://bgoonz-blog.netlify.app/"> | |
<meta name="twitter:title" content="Web-Dev-Hub"> | |
<meta name="twitter:description" content="my resource sharing and blog site ... centered mostly on web development and just a bit of audio production / generally nerdy things I find interesting."> | |
<meta name="twitter:image" content="https://bgoonz-blog.netlify.app/images/code.png"> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="apple-touch-icon" href="logo-circle.png"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta http-equiv="Content-Type" content="HTML"> | |
<meta name="Author" content="Bryan Guner"> | |
<meta name="keywords" content="HTML, Meta Tags, Metadata"> | |
<meta name="description" content="Learning about Web Development."> | |
<link type="image/x-icon" href="./favicon.ico" rel="shortcut icon"> | |
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@bgoonz"> | |
<meta name="twitter:creator" content="@bgoonz"> | |
<meta name="twitter:image:src" content="/logo-circle.png"> | |
<meta name="twitter:title" content="Web Development Resource Hub Bryan Guner"> | |
<meta name="twitter:description" content="The new home of my blog resource sharing website."> | |
<link | |
href="https://instructure-uploads-pdx.s3.us-west-2.amazonaws.com/account_168550000000000001/attachments/537/logo-canvas.png" | |
rel="apple-touch-icon"> | |
<link type="text/css" href="https://fonts.googleapis.com/css?family=Raleway:200,100,400" rel="stylesheet"> | |
thewebdevhub.org | |
<iframe src="https://onedrive.live.com/embed?resid=D21009FDD967A241%21608188&authkey=%21AL1vMFzOuqvFbUY&em=2&wdAr=1.7777777777777777&wdEaa=1" width="1186px" height="691px" frameborder="0">This is an embedded <a target="_blank" href="https://office.com">Microsoft Office</a> presentation, powered by <a target="_blank" href="https://office.com/webapps">Office</a>.</iframe> | |
C:/WINDOWS/System32/wsl.exe | |
pip install -r requirements.txt | |
//APPEND-DIR.js | |
const fs = require('fs'); | |
let cat = require('child_process') | |
.execSync('cat *') | |
.toString('UTF-8'); | |
fs.writeFile('output.md', cat, err => { | |
if (err) throw err; | |
}); | |
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://bootcamp42.gitbook.io/python/ | |
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://golden-lobe-519.notion.site/D1-00a0ab833b7f405a95c8b26a7c9eeede | |
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://golden-lobe-519.notion.site/Data-Structures-c3fe3debbe494b929ed2f20070b631f8 | |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
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"' {} \; | |
killall -s KILL node | |
C:\Users\bryan\AppData\Local\Microsoft\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\ubuntu.exe | |
OAUTHTOKEN: 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 | |
npm i @bgoonz11/repoutils | |
npm i prettier -g | |
prettier --write . | |
Install node modules recursevly ( npm i -g recursive-install ): | |
npm-recursive-install | |
---------------------------------------------------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 'node_modules' -type d -prune -exec rm -rf '{}' + | |
git pull | |
git init | |
git add . | |
git commit -m"update" | |
git push -u origin master | |
<link rel="apple-touch-icon" href="logo-circle.png"> | |
----------------------------------------------Remove Spaces In File/Folder Names----------------------------------------------------------- | |
find . -name "* *" -type d | rename 's/ /_/g' | |
find . -name "* *" -type f | rename 's/ /_/g' | |
- [NETLIFY](https://app.netlify.com/teams/bgoonz/overview) | |
find -type f -name "*~*" -execdir rename -n -v 's/#//' {} + | |
find . -name "* *" -type f | rename 's/#/_/g' | |
find . -name "* *" -type f | rename 's/.html//g' | |
-------------------------------------Remove Numbers From File Names------------------------------------------------------------------------ | |
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 [[ ${#filename} < 9 ]]; then | |
echo ${filename:0:8}.${ext} | |
else | |
echo $1 | |
fi | |
rename 's/^(.{10}).*/$1/' * | |
------------------------------------------- | |
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 *.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 $newname ]] | |
do | |
(( sublen = length - ${#num} )) | |
printf -v newname '%.*s%d' "$sublen" "$file" "$num" | |
(( num++ )) | |
done | |
mv "$file" "$newname" | |
done | |
sed 's/\/.*\/.*\/.*\/\(.*\)/~\/\1/g' * | |
--------------------------------------------------------------------------------------------------------- | |
https://replit.com/@bgoonz/Data-Structures-Algos-Codebase | |
https://repl.it/@bgoonz/funcamentalJS?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/Data-Structures-Algos-Codebase?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/node-db1-project?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/interview-prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/Database-Prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/master-bash-in-15-minutes?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://replit.com/@bgoonz/express-sqlite-app#src/routes/indexRoute.js | |
https://replit.com/@bgoonz/SQLite-starter-Template-Jam#main.sql | |
https://replit.com/@bgoonz/interview-prac#66-plus-one.js | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/stargazers/d' ./repo.txt | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/right\.html/d' ./right.html | |
--------------------------------------------------------------------------------------------------------- | |
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" | |
# usage: | |
# - zipdir thedir | |
# - zip thedir -x "**anotherexcludedsubdir/*" (important the double quotes to prevent glob expansion) | |
# if in windows/git-bash, add 'zip' command this way: | |
# https://stackoverflow.com/a/55749636/1482990 | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
--------------------------------------------------------------------------------------------------------- | |
https://blog-w-comments.vercel.app/ | |
------------------------------------------------GIT--------------------------------------------------------- | |
------------------------------------------------GIT--------------------------------------------------------- | |
------------------------------------------------GIT--------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
OVERWRITE LOCAL CHANGES: | |
Important: If you have any local changes, they will be lost. With or without --hard option, any local commits that haven't been pushed will be lost.[*] | |
If you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected. | |
First, run a fetch to update all origin/<branch> refs to latest: | |
git fetch --all | |
Backup your current branch: | |
git branch backup-master | |
Then, you have two options: | |
git reset --hard origin/master | |
OR If you are on some other branch: | |
git reset --hard origin/<branch_name> | |
Explanation: | |
git fetch downloads the latest from remote without trying to merge or rebase anything. | |
Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master | |
git fetch --all | |
git reset --hard origin/master | |
Remove Submodules: | |
git submodule deinit | |
-------------------------------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 '<MESSAGE>' ; 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: | |
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe", | |
--------------------------------------------------------------------------------------------------------- | |
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----------------------------------------------------------------- | |
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 | |
curl -X GET \ | |
https://api.cacher.io/integrations/show_all \ | |
-H 'cache-control: no-cache' \ | |
-H 'x-api-key: PWzD5TYgjTNGiynMmZu1tZuB' \ | |
-H 'x-api-token: TpaYdFiT7m4grnejMpWXA5aF' > exported_data.json | |
------------------------------------------- | |
---------------------------------------Trouble Shooting------------------------------------------------------------------ | |
input/Output error | |
wsl.exe --shutdown | |
Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
ln -s "$(pwd)" ~/Downloads | |
-------------------------------------------- | |
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 $ZipFiles) { | |
Write-Progress -Activity "Unzipping to $($UnzipPath)" -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status "File $($Progress) of $($ZipFiles.Count)" | |
$ZipFolder = $Shell.NameSpace($ZipFile.fullname) | |
$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 | |
mdt-docs | |
--------------------------------------------------------------------------------------------------------- | |
---------------------------------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 <mydir> -type f -exec sed -i 's/<string1>/<string2>/g' {} + | |
find . -type f -exec rename 's/-master//g' {} + | |
find . -type f -exec rename 's/-theme//g' {} + | |
find . -type f -exec rename 's/-master//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://bootcamp42.gitbook.io/python/ | |
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 | |
find . -name "*.tgz" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
--------------------------------------------------------------------------------------------------------- | |
PUSH IN CHUNCKS: | |
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=10 | |
# check if the branch exists on the remote | |
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# # if so, only push the commits that are not on the remote already | |
# range=$REMOTE/$BRANCH..HEAD | |
# else | |
# # else push all the commits | |
# range=HEAD | |
# fi | |
range=HEAD | |
echo "Range: $r" | |
# count the number of commits to push | |
n=$(git log --first-parent --format=format:x $range | wc -l) | |
echo "Commits to push: $n" | |
# push each batch | |
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 | |
# push the final partial batch | |
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> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/prism.css"> | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
} | |
} | |
} | |
--------------------------------------------------------------------------------------------------------- | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/xGZSWvFess8?start=2" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="./prism.css"> | |
<script async defer src="./prism.js"></script> | |
</head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------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 | |
--------------------------------------------------------------------------------------------------------- | |
Flatten all sub folders into one folder contaning files. | |
find ./ -mindepth 1 -type f -exec mv -t ./ --backup=t '{}' + | |
------------------------ | |
find . -type f -exec sed -i '/Mirrored from/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 <span class=\x27author\x27>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<p>Document generated by Confluence on/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/miguelgrinberg/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Author/d' ./*.html {} \; | |
find -type f -name '*\-fr*' -delete | |
find -type f -name '*\-ja*' -delete | |
find -type f -name '*\-es*' -delete | |
find -type f -name '*\-de*' -delete | |
find -type f -name '*\-ru*' -delete | |
find -type f -name '*\-id*' -delete | |
find -type f -name '*\-pt*' -delete | |
find -type f -name '*\-zh*' -delete | |
find -type f -name '*\-fr*' -delete | |
find -type f -name '*\-fr*' -delete | |
find -type f -name '*\-fr*' -delete | |
find . -type f -exec sed -i '/class="column-list"/d' ./index.html {} \; | |
find . -type f -exec sed -i '/Added by HTTrack/d' ./*.html {} \; | |
--------------------------------------------------------------------------------------------------------- | |
rename -n 's/(.*).{1}/$1/' * | |
rename -n 's/.{1}$//' * | |
rename -n 's/(.*).{1}/$1/' * | |
find . -maxdepth 1 -type d -name '?????????????*' -exec rename -n 's/.{1}$//' {} + | |
for i in *.; do | |
mv "$i" "${i:0:-1}" | |
done | |
git add . | |
git commit -m "update" | |
git push -u origin master | |
--------------------------------------------------------------------------------------------------------- | |
firstname-lastname-day2 | |
git remote remove origin | |
--------------------------------------------------------------------------------------------------------- | |
Download website with wget: | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --adjust-extension -O -e robots=off https://web.dev | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off | |
--------------------------------------------------------------------------------------------------------- | |
find . -name "*.xml" -type f -print | |
s | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
youtube-dl https://www.youtube.com/user/Mihirishere/videos | |
youtube-dl https://www.youtube.com/user/norwex/videos | |
--------------------------------------------------------------------------------------------------------- | |
httrack --ext-depth=2 | |
httrack --ext-depth=2 https://kathyguner.norwex.biz/ | |
httrack https://kathyguner.norwex.biz/ | |
httrack --ext-depth=3 https://www.textfixer.com/html/convert-url-to-html-link.php | |
httrack http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html -O "./temp" %e5 | |
httrack --ext-depth=4 http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html | |
httrack --ext-depth=4 https://www.vickielasher.com/ | |
--------------------------------------------------------------------------------------------------------- | |
grab all links from website | |
lynx -dump https://distrokid.com/hyperfollow/mihirbeg/getting-there | awk '/http/{print $2}' > links2.txt | |
lynx -dump https://geeksforgeeks.org/top-10-useful-github-repos-that-every-developer-should-follow | awk '/http/{print $2}' > links.md | |
lynx -dump https://html.com/blog/100-web-development-cheat-sheets | awk '/http/{print $2}' > links.md | |
wget -qO- www.instagram.com/mihirbeg/ | | |
grep -Eoi '<a [^>]+>' | | |
grep -Eo 'href="[^\"]+"' | | |
grep -Eo '(http|https)://[^/"]+'>output.md | |
--------------------------------------------------------------------------------------------------------- | |
GitFlow_-_step_by_step_a5dcb946b01f4d66be259ba33733763b | |
.*(?<=<script)(.*)(?=<\/script>).* | |
.*\./\.git.* | |
.*node_modules.* | |
find . -name "*.zip" -type f -print | |
find . -name "*.zip" -type f -print -delete | |
find . -name "*.gitignore" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
REMOVE DUPLICATE LINES: | |
uniq -u input.txt output.txt | |
uniq -u resources.html output.html | |
uniq -u testOut.html TESTOUT.html | |
--------------------------------------------------------------------------------------------------------- | |
2.)find and delete all empty directories()===> | |
find . -empty -type d -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
3.)Find and delete all empty files()===> | |
find . -empty -type f -print -delete | |
add extension to every file in folder | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.py \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.png \; | |
find . -type f -exec mv '{}' '{}'.jpg \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.md \; | |
for f in * ; do | |
mv "$f" "$f.md" | |
done | |
for f in * ; do | |
mv "$f" "$f.html" | |
done | |
for f in * ; do | |
mv "$f" "$f.css" | |
done | |
for f in * ; do | |
mv "$f" "$f.jpg" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
delete lines contaning specific string: | |
sed -i '/normalizerEmpty/d' ./js-in-one-page.html | |
sed -i '/\.git/d' ./index.html | |
sed -i '/\.github/d' ./combined.md | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" \) -a -exec sed -i '/BADSTRING/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*scrap3.md" \) -a -exec sed -i '/stargazers/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" -o -name "*.php" \) -a -exec sed -i '/MIT/d' '{}' + | |
find . -type f -a -exec sed -i '/author/d' '{}' + | |
find . -type f -a \( -name "*.html" -o -name "*.md" \) -a -exec sed -i '/[Source]/d' '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/Author/d' ./*.html | |
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 '/\.git/d' ./index.html | |
sudo sed -i '/assets/d' ./index.html | |
sudo sed -i '/stargazers/d' ./scrap3.md | |
--------------------------------------------------------------------------------------------------------- | |
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' | |
sed -n '/author/!p' file | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
find . -name "*" -type f | xargs sed -i -e '/Mirrored from/d' | |
--------------------------------------------------------------------------------------------------------- | |
print out the path of every file recursivley | |
ls -R './' | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }'>listing.md | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
sed -n -e '/<script>/,/<\/script>/p' getting-there.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<script>/,/<\/script>/p' *.html >out.js ./* {} \; | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<code class="sourceCode javascript">/,/<\/code>/p' *.html >out.html ./* {} \; | |
find . -type f -exec sed -n -e '/```js/,/```/p' *.html >out.js ./* {} \; | |
sed -i 's/<script>//g' out.js | |
sed -i 's/<\/script>//g' out.js | |
.*\./<script* | |
(?<=<script)(.*)(?=<\/script>) | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/ <div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html | |
sudo sed -i '/ <a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a>/d' ./*.html | |
sudo sed -i '/ Document generated by Confluence on/d' ./*.html | |
--------------------------------------------------------------------------------------------------------- | |
Resursivley delete node modules | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name 'description\.txt' -type d -prune -exec rm -rf '{}' + | |
/workspace/my-gists/TESTING/description.txt | |
find . -name '\.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
5.) Remember Git Credentials: | |
git config --global credential.helper store | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
------------------ | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_website-components/0-DOJO/widgets-master/output/info/stats.json' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_00-4-all-time/_0-Random-Repo/zipped.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_NOTES/database-notes/repl.it-sql/repl.it - SQL/SQLIntroductions.mp4' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_f95b7cbda3503d5d3f539e0c8401209c6f7c0c91f6ae2fa510a6efcaeaf697ef' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_7-assets/Past-Cohort/LambdaSchool-master.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_PDFS/Head_First_Csharp.pdf' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch git filter-branch --index-filter 'git rm -r | |
--cached --ignore-unmatch assets/_index.html' HEAD' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
nano | |
When you're done, hit CTRL+O to save and CTRL+X to exit Nano. You'll just need to restart the SSH server with one of the following commands. | |
$ systemctl restart sshd | |
$ service sshd restart | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley Create numbered folders: | |
n=1; | |
max=50; | |
while [ "$n" -le "$max" ]; do | |
mkdir "s$n" | |
n=`expr "$n" + 1`; | |
done | |
--------------------------------------------------------------------------------------------------------- | |
Command Line: Rename all files in current directory to a certain file extension: | |
forfiles /S /M * /C "cmd /c rename @file @fname.js" | |
forfiles /S /M * /C "cmd /c rename @file @fname.html" | |
forfiles /S /M * /C "cmd /c rename @file @fname.md" | |
forfiles /S /M * /C "cmd /c rename @file @fname.java" | |
--------------------------------------------------------------------------------------------------------- | |
The following command would rename all *.txt files to *.doc. | |
$ rename 's/\.txt$/.doc/' *.txt | |
rename 's/\.txt$/.js/' *.txt | |
$ rename 's/\.example$/.sql/' *.example | |
rename 's/\.js\.download$/.js/' *.js\.download | |
find . -name "*.htm" -exec rename 's/\.htm$/.html/' '{}' + | |
find . -name "*.\.js\.download" -exec rename 's/\.js\.download$/.js/' '{}' + | |
echo "</body></html>" | tee -a *.html | |
rename 's/\.html\.tmp$/.html/' *.html\.tmp | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
------------------------------------From html >md below--------------------------------------------------------------------- | |
pandoc --wrap=none --from html --to markdown_strict | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc "${0}" -o "${0%.html}.md"' {} \; | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley list every single file in the working directory... 1 per line: | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
write-to-txt-file | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
--------for only html-files------------------------------------------------------------------------------ | |
find ./ | grep -i "\.html*$" | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
forfiles /S /M *.File /C "cmd /c rename @file @fname.js" | |
--------------------------------------------------------------------------------------------------------- | |
Recreate folder structure with only specific file types | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './..' | |
find . -type f -name '*.png' | cpio -p -d -v './_ext' | |
find . -name '*.README.md' | cpio -pdm './extension-readme' | |
find . -name '*.md' | cpio -pdm './../Markdown' | |
find . -name '*.git' | cpio -pdm './GIT-FOLDERS' | |
--------------------------------------------------------------------------------------------------------- | |
7.) ()===> | |
--------------------------------------------------------------------------------------------------------- | |
8.) Command Prompt: code --list-extensions | |
for /F "tokens=*" %A in (extensions.list) do code --install-extension %A | |
--------------------------------------------------------------------------------------------------------- | |
9.)Create a soft link in the home dir | |
ln -s /mnt/c/0-a-A-October | |
--------------------------------------------------------------------------------------------------------- | |
10.) | |
sudo apt update | |
sudo apt upgrade | |
git config --global user.name bryan | |
git config --global user.email [email protected] | |
sudo apt update | |
sudo apt install build-essential | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
. ./.bashrc | |
nvm install --lts | |
sudo apt install unzip | |
npm install -g mocha | |
npm audit fix -F | |
npm audit fix -f | |
npm install -g mocha | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install python3 | |
----------------------------------------------------------------------------------------------------------- | |
Command Line vscode | |
code --list-extensions | |
code --disable-extension <ext-name> | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
dockerd | |
----------------------------------------------------------------------------------------------------------- | |
killall node | |
----------------------------------------------------------------------------------------------------------- | |
sudo service postgresql stop | |
sudo service postgresql start | |
sudo service postgresql restart | |
---------------------------------------- | |
sed -e '/.git/ { | |
$!N | |
d | |
}'index.html | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. | |
--restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
--domains yoursite.com \ # Do not follow links outside this domain. | |
--no-parent \ # Don't follow links outside the directory you pass in. | |
https://www.instagram.com/mihirbeg/?hl=en | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://soybean-tulip-em56.squarespace.com/config/pages | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://cheatography.com/davechild/cheat-sheets/regular-expressions/ | |
https://ankiweb.net/decks/ | |
----------------------------------------------------------------------------------------------------------- | |
cat * > ./merged-file.html | |
find . -type f -exec 'pandoc -s *.docx -t markdown -o example35.md' {} \; | |
pandoc -s *.docx -t markdown -o example35.md | |
pandoc -s *.docx > output.md | |
pandoc -s *.py > output.md | |
Copy file structure without the files: | |
rsync -a -f"+ */" -f"- *" './'/ './structure/'/ | |
rsync -a -f"+ */" -f"- *" ./ ./../folder/ | |
rsync -a -f"+ */" -f"- *" source/ destination/ | |
----------------------------------------------------------------------------------------------------------- | |
Remove Script tags and their content: | |
find ./ -iname "*.html" -type f -exec sh -c 'sed "/<script/,/<\/script>/d" *.html' {} \; >testOut.html | |
----------------------------------------------------------------------------------------------------------- | |
cat *.html > node-mod-readme.html | |
----------------------------------------------------------------------------------------------------------- | |
Powershell remove numbers and dashes from file names: | |
Dir | Rename-Item –NewName { $_.name –replace " ","_" } | |
Dir | Rename-Item –NewName { $_.name –replace "1","" } | |
Dir | Rename-Item –NewName { $_.name –replace "2","" } | |
Dir | Rename-Item –NewName { $_.name –replace "3","" } | |
Dir | Rename-Item –NewName { $_.name –replace "4","" } | |
Dir | Rename-Item –NewName { $_.name –replace "5","" } | |
Dir | Rename-Item –NewName { $_.name –replace "6","" } | |
Dir | Rename-Item –NewName { $_.name –replace "7","" } | |
Dir | Rename-Item –NewName { $_.name –replace "8","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "-","" } | |
Dir | Rename-Item –NewName { $_.name –replace "0","" } | |
----------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
sudo sed -i '/:::/d' ./*.mc | |
sudo sed -i '/Blog at WordPress/d' ./index.html | |
find . -type f -exec sed -i '/Blog at WordPress/d' ./* {} \; | |
sudo sed -i '/right\.html/d' ./index.html | |
find . -type f -exec sed -i '/walkthrough/d' ./* {} \; | |
sudo sed -i '/walkthrough/d' ./*.html | |
sudo sed -i '/node_modules/d' ./sitemap.html | |
sudo sed -i '/"raw_url":/!d' ./my-gists.json | |
sudo sed -i '/index\.html/!d' ./index.html | |
sudo sed -i '/#/d' ./qandstack.py | |
sed -i "/"""/,/""":/d" your_file | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/sol\~/d' ./right.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
sudo sed -i '/\.svg/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.jpg/d' ./index.html | |
sudo sed -i '/\.scss/d' ./index.html | |
sudo sed -i '/scss/d' ./index.html | |
sudo sed -i '/\.txt/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.pdf/d' ./index.html | |
sudo sed -i '/\.mp4/d' ./index.html | |
sudo sed -i '/\.pug/d' ./index.html | |
sudo sed -i '/\.DS_store/d' ./index.html | |
sudo sed -i '/\.DS_Store/d' ./index.html | |
sudo sed -i '/\.sql/d' ./index.html | |
sudo sed -i '/\.py/d' ./index.html | |
sudo sed -i '/\.xlsx/d' ./index.html | |
sudo sed -i '/\.JPG/d' ./index.html | |
sudo sed -i '/\.TTF/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.eot/d' ./index.html | |
sudo sed -i '/\.ttc/d' ./index.html | |
sudo sed -i '/\.PNG/d' ./index.html | |
sudo sed -i '/\.java/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.go/d' ./index.html | |
sudo sed -i '/\.vue/d' ./index.html | |
sudo sed -i '/clone_url/!d' ./scrap.md | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="sitemap.html" | |
out="basename $out.html" | |
html="sitemap.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
prettier --write . | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
npm audit fix --force | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
npm install | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
sudo sed -i '/Blog at WordPress/d' ./*.html | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
---------------------------------------------------------------------------------------------------------- | |
mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g') | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
find . -type f -exec sed -n -e '/```javascript/,/```/p' *.html >out.js ./* {} \; | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
--------------------------------------------Sanatize-------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g') | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
---------------------------------------------------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
npm run develop | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
#!/bin/bash | |
( | |
IFS=$'\n' | |
for y in $(ls $1) | |
do | |
mv $1/`echo $y | sed 's/ /\\ /g'` $1/`echo "$y" | sed 's/ /_/g'` | |
done | |
) | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for file in *; do mv "$file" `echo $file | tr '_' '.'` ; done | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for file in *; do mv "$file" `echo $file | tr '_' '.'` ; done | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
---------------------------------------------------------------------------------------------------------- | |
----------------------------------------------------------------------------------------------------------- | |
<pre><code> | |
#!/bin/bash | |
link="#insert url here#" | |
#links were a set of strings with just the index of the video as the variable | |
num=3 | |
#first video was numbered 3 - weird. | |
ext=".mp4" | |
while [ $num -le 66 ] | |
do | |
wget $link$num$ext -P ~/Downloads/ | |
num=$(($num+1)) | |
done | |
</code></pre> | |
----------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/{#3585 \.graf \.graf--mixtapeEmbed \.graf-after--p /d' ./*.md | |
print a dummy text file in each folder | |
for x in "./"/*/; do | |
(cd "$x" | |
files=(*) | |
printf '%s\n' "${files[@]}" > deleteme.txt | |
) | |
done | |
----------------------------------------------------------------------------------------------------------- | |
download all links of given file type | |
wget -r -A.pdf https://overapi.com/git | |
----------------------------------------------------------------------------------------------------------- | |
for file in *. | |
do | |
sudo sed -i '/Copyright/d' ./*.html | |
done | |
sudo sed -i '/Support/d' ./*.html | |
sudo sed -i '/MIT/d' ./*.html | |
sudo sed -i '/License/d' ./*.html | |
sudo sed -i '/Contributors/d' ./*.html | |
sudo sed -i '/Copyright/d' ./*.html | |
sudo sed -i '/copyright/d' ./*.html | |
sudo sed -i '/Copyright © /d' ./*.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Remove any lines not contaning string text or blah | |
sudo sed -i '/\.html/!d' scrap.md | |
sudo sed -i '/\.html/!d' index.html | |
sudo sed -i '/\.js/!d' ./SCRAP.html | |
sudo sed -i '/CODE-MIRROR/d' ./resources.html | |
sudo sed -i '/!\[\](/d' ./lecture-notes.md | |
sudo sed -i '/\.html/d' ./index.html | |
sudo sed -i '/Exported from/d' ./*.html | |
sudo sed -i '/src="data:image/d' ./everyonescodepens.html | |
--------------------------------------------------------------------------------------------------------- | |
# Reinstall all npm packages | |
npm i npm-reinstall | |
reinstall | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/127/d' ./scrap.md | |
--------------------------------------------------------------------------------------------------------- | |
Delete Files Over certain Size: | |
find . -size +75M -a -print -a -exec rm -f {} \; | |
find . -size +98M -a -print -a -exec rm -f {} \; | |
ompare across forks, base-fork -> main). | |
find . -size +75M -a -exec rm -f {} \; | |
--------------------------------Recursivly pull and accept incomming merge changes------------------------------------------------------------------------- | |
<body> | |
<a href="https://github.com/bgoonz" class="github-corner" | |
aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" | |
style="z-index: 100000; fill:#194ccdaf; color:#fff; position: fixed; top: 20px; border: 0; left: 20px; transform: scale(-1.5, 1.5);" | |
aria-hidden="true"> | |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | |
<path | |
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" | |
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"> | |
</path> | |
<path | |
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" | |
fill="currentColor" class="octo-body"></path> | |
</svg></a> | |
1865 | |
git pull -s recursive -X ours https://github.com/Web-Dev-Collaborative/archive-backup.git | |
git pull -s recursive -X ours https://github.com/bgoonz/Lambda.git | |
git pull -s recursive -X theirs url | |
git pull -s recursive -X theirs https://github.com/bgoonz/Lambda.git | |
--------------------------------------------------------------------------------------------------------- | |
Overwrite local repo: | |
git fetch origin | |
git reset --hard origin/master | |
--------------------------------------------------------------------------------------------------------- | |
Add text to the first line of every file of a certain extension in a given folder. | |
for f in *.js; do printf '%s\n' 0a '//------------------------------------------------------------------------------------------------' . x | ex "$f"; done | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------------------------How to add to end of file:------------------------------------------------------ | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
Recursive NPM install: | |
Usage | |
$ npm-recursive-install | |
--------------------------------------------------------------------------------------------------------- | |
for filename in *mesibo*; do echo mv \"$filename\" \"${filename//mesibo/zumzi}\"; done > rename.md | |
for filename in *mesibo*; do mv "$filename" "${filename//mesibo/zumzi}"; done | |
for d in */ ; do | |
echo "$d" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
<form action="https://liveformhq.com/form/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5" method="POST" accept-charset="utf-8"> | |
<input type="hidden" name="_utf8" value="✓"> | |
<!-- | |
NOTE: This is an optional field, if your form has a field named '_redirect', | |
The user will be redirected to this page after the submission is saved | |
--> | |
<input type="hidden" value="https://liveformhq.com/thank_you" name="_redirect" /> | |
<label for="name">Name</label> | |
<input type="text" id="name" name="name"> <br /> | |
<label for="email">Email</label> | |
<input type="text" id="email" name="email"> <br /> | |
<button type="submit">Submit</button> | |
</form> | |
--------------------------------------------------------------------------------------------------------- | |
Input Output error | |
wsl.exe --shutdown then Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
Replace the string source with target in all files in the current directory and all sub-directories: | |
find . -type f -exec rename 's/source/target/' {} \; | |
Replace the string source with target in all directories in the current directory and all sub-directories: | |
find . -type d -exec rename 's/source/target/' {} \; | |
find . -type f -exec rename 's/\_/-/' {} \; | |
find . -type f -exec rename 's/\_gif//' {} \; | |
find . -type f -exec rename 's/\_jpg//' {} \; | |
find . -type f -exec rename 's/\.svg//' {} \; | |
find . -type f -exec rename 's/\~/\-/' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
I use this one-liner to remove invalid characters in subtitle files: | |
for f in *.srt; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
Only process *.srt files( * could be used in place of *.srt to process every file) | |
Removes all other characters except for letters A-Za-z, numbers 0-9, periods ".", and dash's "-" | |
Removes possible double or triple periods | |
Checks to see if the file name needs changing | |
If true, it renames the file with the mv command, then outputs the changes it made with the echo command | |
It works to normalize directory names of movies: | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.]/./g' -e 's/\.\.\././g' -e 's/\.\././g' -e 's/\.*$//'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
--------------------------------------------------------------------------------------------------------- | |
To remove any number of trailing spaces from file names you can use rename (prename) : | |
rename 's/ *$//' * | |
find ./ -type f -exec rename 's/ *$//' *' {} \; | |
find ./ -type d -exec rename 's/ *$//' * {} \; | |
--------------------------------------------------------------------------------------------------------- | |
This shell script sanitizes a directory recursively, to make files portable between Linux/Windows and FAT/NTFS/exFAT. It removes control characters, /:*?"<>\| and some reserved Windows names like COM0. | |
sanitize() { | |
shopt -s extglob; | |
filename=$(basename "$1") | |
directory=$(dirname "$1") | |
filename_clean=$(echo "$filename" | sed -e 's/[\\/:\*\?"<>\|\x01-\x1F\x7F]//g' -e 's/^\(nul\|prn\|con\|lpt[0-9]\|com[0-9]\|aux\)\(\.\|$\)//i' -e 's/^\.*$//' -e 's/^$/NONAME/') | |
if (test "$filename" != "$filename_clean") | |
then | |
mv -v "$1" "$directory/$filename_clean" | |
fi | |
} | |
export -f sanitize | |
sanitize_dir() { | |
find "$1" -depth -exec bash -c 'sanitize "$0"' {} \; | |
} | |
sanitize_dir './' | |
sanitize_dir './' | |
---------------------------------------------------OR------------------------------------------------------------ | |
#!/bin/bash | |
function sanitize_file_name { | |
echo -n $1 | perl -pe 's/[\?\[\]\/\\=<>:;,''"&\$#*()|~`!{}%+]//g;' -pe 's/[\r\n\t -]+/-/g;' | |
} | |
filename="Wh00t? it's a -- re@lly-weird {file&name} (with + Plus and__1% #of# [\$qRots\$!]).mov" | |
cleaned=$(sanitize_file_name "$filename") | |
echo original : "$filename" | |
echo sanitised: "$cleaned" | |
--------------------------------------------------------------------------------------------------------------- | |
Center-Line | |
<hr> | |
<center> | |
<img | |
src="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/23b9b236-746e-409c-8e86-30b4385e3b72/hr1-raypham.gif" | |
alt="hr-line" width="781" height="22"> | |
<p class="text spotlight">Documentation</p> | |
</center> | |
<hr> | |
--------------------------------------------------------------------------------------------------------------- | |
const findUp = require('find-up'); | |
findUp('test.html').then(filepath => { | |
console.log(filepath); | |
}); | |
--------------------------------------------------------------------------------------------------------------- | |
Extract TGZ | |
for file in `ls -1`; do | |
sudo tar -xvf "${file}" ; done | |
function extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; | |
*.tar.gz) tar xvzf $1 ;; | |
*.tar.xz) tar Jxvf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xvf $1 ;; | |
*.tbz2) tar xvjf $1 ;; | |
*.tgz) tar xvzf $1 ;; | |
*.zip) unzip -d `echo $1 | sed 's/\(.*\)\.zip/\1/'` $1;; | |
*.Z) uncompress $1 ;; | |
*.7z) 7z x $1 ;; | |
*) echo "don't know how to extract '$1'" ;; | |
esac | |
else | |
echo "'$1' is not a valid file!" | |
fi | |
} | |
find ./ -type f -name "*.tgz" -exec sudo tar -xvf "${file}" | |
-----------------------------Get tripple backtick code blocks---------------------------------------------------------------------------------- | |
sed -n '/^```/,/^```/ p' < input.file | |
--------------------------------------------------------------------------------------------------------------- | |
Recursivley remove files by name: | |
find . -name hts-log.txt -type f -exec rm -rf {} \; | |
find . -name cookies.txt -type f -exec rm -rf {} \; | |
find . -name fade.gif -type f -execcp rm -rf {} \; | |
find . -name right.html -type f -exec cp rm -rf {} \; | |
Recursivley remove folders by name. | |
find . -type f -exec sed -i '/Mirrored from/d' ./* {} \; | |
find . -type f -exec sed -i '/Exported from /d' ./* {} \; | |
find . -type f -exec sed -i '/define/d' ./* {} \; | |
--------------------------------------------------------------------------------------------------------------- | |
Passionate Web Developer, Electrical Engineer, Audio Engineer and Musician / Teacher! A passionate Web Developer, Electrical Engineer, Musician & Producer 🔭 Contract Web Development Relational Concepts 🌱 I’m currently learning React/Redux, Python, Java, Express, jQuery 👯 I’m looking to collaborate on Any web audio or open source educational tools. 🤝 | |
--------------------------------------------------------------------------------------------------------------- | |
error: refs/remotes/origin/depfu/update/core-siteother-pagesweeksweek-10sequelize-recipe-box-solution/npm/pug-3.0.2 does not point to a valid object! | |
#!/bin/sh | |
set -e | |
if [ $# -eq 0 ]; then | |
dir="." | |
else | |
dir="$1" | |
fi | |
if [ ! -d "$dir" ]; then | |
echo "not a dir: $dir" | |
exit 1 | |
fi | |
if [ ! -d "$dir/.git" ]; then | |
echo "not a git repo: $dir" | |
exit 1 | |
fi | |
cd "$dir" | |
files=$(find .git/refs -type f) | |
for f in $files; do | |
id=$(cat "$f") | |
if ! git rev-parse --quiet "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing ref $f with missing commit $id" | |
rm "$f" | |
fi | |
done | |
if [ ! -f .git/packed-refs ]; then | |
exit 0 | |
fi | |
packfiles=$(cat .git/packed-refs \ | |
| grep -v '#' \ | |
| awk '{print $2}') | |
for f in $packfiles; do | |
if ! git rev-parse --quiet --verify "$f" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
id=$(git rev-parse "$f") | |
if ! git rev-parse --quiet --verify "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing packed ref $f with missing commit $id" | |
git update-ref -d $f | |
fi | |
done | |
git config --system core.longpaths true | |
find . -name "* *" -type f | rename 's/.png.html.png/.png/g' | |
----------------------Index of Iframes---------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<iframe src=\""$1"\">","</iframe>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
# Github URLS: | |
# Table of contents | |
- [Home](https://github.com/bgoonz/python-gitbook/blob/master/README.md) | |
- [Downloads & Misc-Assets](https://github.com/bgoonz/python-gitbook/blob/master/index.md) | |
- [README](https://github.com/bgoonz/python-gitbook/blob/master/readme-1.md) | |
- [Navigation](https://github.com/bgoonz/python-gitbook/blob/master/navigation.md) | |
## Cirriculumn | |
- [Outline](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled/README.md) | |
- [General Content](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled/general-content.md) | |
- [wk17](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/README.md) | |
- [Outline-w17](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/outline.md) | |
- [homework](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/week-overview.md) | |
- [D1-Module 01 - Python I](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/untitled-2/README.md) | |
- [Configuring Ubuntu for Python Web Development](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/untitled-2/configuring-ubuntu-for-python-web-development.md) | |
- [Install Python](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/untitled-2/install-python.md) | |
- [D2- Module 02 - Python II](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/untitled-1-1.md) | |
- [D3- Module 03 - Python III](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/untitled-1.md) | |
- [D4-Module 04 - Python IV](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-3/untitled.md) | |
- [wk18](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/README.md) | |
- [Outline-W-18](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-4.md) | |
- [D1- Module 01 - Number Bases and Character Encoding](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-3.md) | |
- [D2- Module 02 - Hash Tables I](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-2/README.md) | |
- [Hash Table / Hash Map In Python:](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-2/hash-table-hash-map-in-python.md) | |
- [Hash Table Use Cases](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-2/hash-table-use-cases.md) | |
- [Practice](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-2/practice.md) | |
- [D3-Module 03 - Hash Tables II](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled-1.md) | |
- [D4- Module 04 - Searching and Recursion](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-2/untitled.md) | |
- [wk19](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/README.md) | |
- [Outline-W-19](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/overview.md) | |
- [D1- Module 01 - Linked Lists](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/untitled-3.md) | |
- [D2- Module 02 - Queues and Stacks](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/untitled-7.md) | |
- [D3- Module 03 - Binary Search Trees](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/untitled-8/README.md) | |
- [BST Definition:](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/untitled-8/bst-definition.md) | |
- [D4- Module 04 - Tree Traversal](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/untitled-5/README.md) | |
- [Tree Traversals \(Inorder, Preorder and Postorder\)](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-4/untitled-5/tree-traversals-inorder-preorder-and-postorder.md) | |
- [wk20](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-1/README.md) | |
- [Outline-W-20](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-1/overview.md) | |
- [D1-Graphs I](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-1/untitled-5.md) | |
- [D2-Graphs 2](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-1/untitled-4.md) | |
- [DFS](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-1/untitled-1.md) | |
- [D4](https://github.com/bgoonz/python-gitbook/blob/master/cirriculumn/untitled-1/untitled-2.md) | |
## Abstract Data Structures | |
- [Abstract Data Structures:](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/README.md) | |
- [Data Structures Overview](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-7/README.md) | |
- [DS-Explained-Simple](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-7/ds-explained-simple.md) | |
- [Untitled](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-7/untitled.md) | |
- [Algorithms](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-7/algorithms.md) | |
- [Dictionary](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-7/dictionary.md) | |
- [Array](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/array/README.md) | |
- [Extra-Array](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/array/extra-array.md) | |
- [Array Practice](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/array/array-practice.md) | |
- [Binary Search](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/binary-search.md) | |
- [Exotic](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled/README.md) | |
- [Tire](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled/tire.md) | |
- [Dynamic Programming](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled/dynamic-programming.md) | |
- [Graphs](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/README.md) | |
- [Overflow Practice Problems](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/overflow-practice-problems.md) | |
- [Graphs Explained](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/graphs-explained.md) | |
- [Earliest Ancestor](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/earliest-ancestor.md) | |
- [\_Mini Graph-Projects](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/_mini-graph-projects/README.md) | |
- [\# Social Graph](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/_mini-graph-projects/social-graph.md) | |
- [number of 1 islands](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/_mini-graph-projects/number-of-1-islands.md) | |
- [Searching and Generating Graphs](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/_mini-graph-projects/searching-and-generating-graphs.md) | |
- [Graph FAQ](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/graph-faq/README.md) | |
- [Graph DFS](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/graph-faq/graph-dfs.md) | |
- [Connected Components](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/connected-components.md) | |
- [Randomness](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/untitled.md) | |
- [Graph BFS](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/graph-bfs.md) | |
- [Topological Sort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-1/topological-sort.md) | |
- [Hash Table](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-5/README.md) | |
- [Hashmap or Hash tables](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-5/hashmap-or-hash-tables.md) | |
- [Hash Table and HashMap in Python](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-5/hash-table-and-hashmap-in-python.md) | |
- [Heap](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/heap/README.md) | |
- [Heap Examples](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/heap/heap-examples.md) | |
- [String](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/string.md) | |
- [Map](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/map/README.md) | |
- [Examples](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/map/examples.md) | |
- [Queue](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/queue/README.md) | |
- [Queue Continued...](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/queue/queue-continued....md) | |
- [Queue Sandbox](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/queue/queue-sandbox.md) | |
- [Dequeue](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/queue/dequeue.md) | |
- [Tree](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/README.md) | |
- [In Order Traversal](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/in-order-traversal.md) | |
- [Tree Equal ?](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/tree-equal.md) | |
- [Ternary-search-trees](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/ternary-search-trees.md) | |
- [Red_Black Tree](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/red_black-tree.md) | |
- [Tree Mirror:](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/tree-mirror.md) | |
- [Tree Traversal](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/tree-traversal.md) | |
- [Binary Search Tree](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/binary-search-tree/README.md) | |
- [BST Explained](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/binary-search-tree/bst-explained.md) | |
- [BST Insert](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/binary-search-tree/bst-insert.md) | |
- [Binary Tree](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/binary-tree/README.md) | |
- [Binary Tree Explained](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/binary-tree/binary-tree-explained.md) | |
- [Find the maximum path sum between two leaves of a binary tree](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/tree/binary-tree/find-the-maximum-path-sum-between-two-leaves-of-a-binary-tree.md) | |
- [Recursion](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-6/README.md) | |
- [Recursion Explained](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-6/recursion-explained/README.md) | |
- [Recursion Examples](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-6/recursion-explained/recursion-examples.md) | |
- [Linked List](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-4/README.md) | |
- [Linked List Background](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-4/untitled.md) | |
- [Double Linked List](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-4/double-linked-list.md) | |
- [List Example](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-4/list-example.md) | |
- [Examples \(LL\) continued](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-4/examples-ll-continued.md) | |
- [List Operations](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-4/list-operations.md) | |
- [Set](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/set/README.md) | |
- [Set](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/set/set.md) | |
- [Set Intersection Union](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/set/set-intersection-union.md) | |
- [Disjoint Set](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/set/disjoint-set.md) | |
- [Sorting](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/README.md) | |
- [Merge Sort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/merge-sort-1.md) | |
- [Iterative Sorting](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/iterative-sorting.md) | |
- [Recursive Sorting](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/recursive-sorting.md) | |
- [Graph Topological Sort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/graph-topological-sort.md) | |
- [SelectionSort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/selectionsort.md) | |
- [Quick Sort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/untitled-7.md) | |
- [Merge Sort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/merge-sort.md) | |
- [Insertion Sort](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-3/insertion-sort.md) | |
- [Stack](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/stack/README.md) | |
- [Stack Continued](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/stack/stack-continued.md) | |
- [Stack Part 3](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/stack/stack-part-3.md) | |
- [Searching](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-2/README.md) | |
- [Binary Search](https://github.com/bgoonz/python-gitbook/blob/master/abstract-data-structures/untitled-1/untitled-2/binary-search.md) | |
## Utilities | |
- [Code lab Notebooks](https://github.com/bgoonz/python-gitbook/blob/master/utilities/code-lab-notebooks.md) | |
- [Repl.IT](https://github.com/bgoonz/python-gitbook/blob/master/utilities/repl.it/README.md) | |
- [Trinket](https://github.com/bgoonz/python-gitbook/blob/master/utilities/repl.it/trinket.md) | |
- [Utilites](https://github.com/bgoonz/python-gitbook/blob/master/utilities/untitled/README.md) | |
- [YouTube](https://github.com/bgoonz/python-gitbook/blob/master/utilities/untitled/untitled.md) | |
- [Code Lab Notebook Embeds From Lecture](https://github.com/bgoonz/python-gitbook/blob/master/utilities/untitled/code-lab-notebook-embeds-from-lecture.md) | |
## practice | |
- [GCA Sprint Prep:](https://github.com/bgoonz/python-gitbook/blob/master/practice/gca-sprint-prep/README.md) | |
- [Code Signal CGA Sprint Resources](https://github.com/bgoonz/python-gitbook/blob/master/practice/gca-sprint-prep/code-signal-cga-sprint-resources.md) | |
- [CGA-Sprint Prep](https://github.com/bgoonz/python-gitbook/blob/master/practice/gca-sprint-prep/cga-sprint-prep.md) | |
- [Supplemental Practice:](https://github.com/bgoonz/python-gitbook/blob/master/practice/supplemental-practice/README.md) | |
- [Industry Standard Algorithms](https://github.com/bgoonz/python-gitbook/blob/master/practice/supplemental-practice/industry-standard-algorithms/README.md) | |
- [Interview Practice Resources](https://github.com/bgoonz/python-gitbook/blob/master/practice/supplemental-practice/industry-standard-algorithms/interview-practice-resources.md) | |
- [Write a Program to Find the Maximum Depth or Height of a Tree](https://github.com/bgoonz/python-gitbook/blob/master/practice/supplemental-practice/industry-standard-algorithms/write-a-program-to-find-the-maximum-depth-or-height-of-a-tree.md) | |
- [Random Examples](https://github.com/bgoonz/python-gitbook/blob/master/practice/supplemental-practice/random-examples.md) | |
- [Prompts](https://github.com/bgoonz/python-gitbook/blob/master/practice/supplemental-practice/prompts.md) | |
## Resources | |
- [Python Cheat Sheet](https://github.com/bgoonz/python-gitbook/blob/master/resources/python-cheat-sheet.md) | |
- [Intro 2 Python](https://github.com/bgoonz/python-gitbook/blob/master/resources/intro-2-python.md) | |
- [Inheritance](https://github.com/bgoonz/python-gitbook/blob/master/resources/untitled-2.md) | |
- [Strings](https://github.com/bgoonz/python-gitbook/blob/master/resources/strings/README.md) | |
- [Strings Continued](https://github.com/bgoonz/python-gitbook/blob/master/resources/strings/strings-continued.md) | |
- [Dictionaries](https://github.com/bgoonz/python-gitbook/blob/master/resources/dictionaries/README.md) | |
- [Dictionaries Continued](https://github.com/bgoonz/python-gitbook/blob/master/resources/dictionaries/dictionaries-continued.md) | |
- [Python VS JavaScript](https://github.com/bgoonz/python-gitbook/blob/master/resources/python-vs-javascript.md) | |
- [Misc. Resources](https://github.com/bgoonz/python-gitbook/blob/master/resources/untitled-1.md) | |
- [Things To Internalize:](https://github.com/bgoonz/python-gitbook/blob/master/resources/things-to-internalize/README.md) | |
- [Functions](https://github.com/bgoonz/python-gitbook/blob/master/resources/things-to-internalize/functions.md) | |
- [Intro To Python w Jupyter Notebooks](https://github.com/bgoonz/python-gitbook/blob/master/resources/intro-to-python-w-jupyter-notebooks.md) | |
- [Calculating Big O](https://github.com/bgoonz/python-gitbook/blob/master/resources/calculating-big-o.md) | |
- [Awesome Python](https://github.com/bgoonz/python-gitbook/blob/master/resources/awesome-python.md) | |
- [Youtube](https://github.com/bgoonz/python-gitbook/blob/master/resources/youtube.md) | |
- [Useful Links](https://github.com/bgoonz/python-gitbook/blob/master/resources/untitled/README.md) | |
- [My-Links](https://github.com/bgoonz/python-gitbook/blob/master/resources/untitled/my-links.md) | |
- [Beginners Guide To Python](https://github.com/bgoonz/python-gitbook/blob/master/resources/untitled/beginners-guide-to-python.md) | |
## quick-reference | |
- [My Medium Articles](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/my-medium-articles.md) | |
- [Free Python Books](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/free-python-books.md) | |
- [WHY Python?](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/why-python.md) | |
- [Python Snippets](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/python-snippets.md) | |
- [Python3 Regex](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/python3-regex.md) | |
- [Python Module Index:](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/python-module-index/README.md) | |
- [Requests Module](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/python-module-index/requests-module.md) | |
- [Creating Python Modules](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/creating-python-modules.md) | |
- [Useful Info](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/untitled.md) | |
- [Python Glossary](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/python-glossary.md) | |
- [Python Snippets](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/untitled-1.md) | |
- [List Of Python Cheat Sheets](https://github.com/bgoonz/python-gitbook/blob/master/quick-reference/bash-commands.md) | |
## Docs <a id="stdlib"></a> | |
- [Touple](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/touple.md) | |
- [Docs](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/untitled/README.md) | |
- [String-Methods](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/untitled/string-methods.md) | |
- [Basic Syntax](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/basic-syntax.md) | |
- [Lists](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/lists/README.md) | |
- [Python Data Structures](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/lists/python-data-structures.md) | |
- [More On Lists](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/lists/more-on-lists.md) | |
- [Examples](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/lists/examples/README.md) | |
- [More-Examples](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/lists/examples/more-examples.md) | |
- [List Compehensions](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/lists/list-compehensions.md) | |
- [Conditionals and loops](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/conditionals-and-loops.md) | |
- [Dictionaries](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/dictionaries.md) | |
- [Classes and objects](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/classes-and-objects/README.md) | |
- [Classes](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/classes-and-objects/classes/README.md) | |
- [Python Objects & Classes](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/classes-and-objects/classes/python-objects-and-classes.md) | |
- [index](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/classes-and-objects/classes/untitled.md) | |
- [Functions](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/untitled-1.md) | |
- [Built In Functions](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/built-in-functions/README.md) | |
- [Zip Function](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/built-in-functions/zip-function.md) | |
- [Built-in Types](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/untitled-2.md) | |
- [Dictionaries, sets, files, and modules](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/dictionaries-sets-files-and-modules.md) | |
- [Queue & Stacks](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/queue-and-stacks.md) | |
- [Values Expressions & Statments](https://github.com/bgoonz/python-gitbook/blob/master/stdlib/values-expressions-and-statments.md) | |
## MISC | |
- [Built-in Methods & Functions](https://github.com/bgoonz/python-gitbook/blob/master/misc/built-in-methods-and-functions.md) | |
- [Math](https://github.com/bgoonz/python-gitbook/blob/master/misc/math.md) | |
- [Unsorted Examples](https://github.com/bgoonz/python-gitbook/blob/master/misc/unsorted-examples.md) | |
- [Outline](https://github.com/bgoonz/python-gitbook/blob/master/misc/outline.md) | |
- [About Python](https://github.com/bgoonz/python-gitbook/blob/master/misc/untitled/README.md) | |
- [Python VS JavaScript](https://github.com/bgoonz/python-gitbook/blob/master/misc/untitled/python-vs-javascript.md) | |
- [Python Modules & Python Packages](https://github.com/bgoonz/python-gitbook/blob/master/misc/untitled/untitled-1.md) | |
- [Misc](https://github.com/bgoonz/python-gitbook/blob/master/misc/untitled/misc.md) | |
- [Python's Default Argument Values and Lists](https://github.com/bgoonz/python-gitbook/blob/master/misc/untitled/pythons-default-argument-values-and-lists.md) | |
- [SCRAP](https://github.com/bgoonz/python-gitbook/blob/master/misc/untitled/untitled.md) | |
## Interview Prep | |
- [Interview Resources](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/README.md) | |
- [By Example](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/by-example.md) | |
- [Permutation](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/permutation.md) | |
- [General Data Structures Notes](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/general-data-structures-notes.md) | |
- [How to Write an Effective Resume of Python Developer](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/how-to-write-an-effective-resume-of-python-developer.md) | |
- [Interview Checklist](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/interview-checklist.md) | |
- [150 Practice Problems & Solutions](https://github.com/bgoonz/python-gitbook/blob/master/interview-prep/interview-resources/150-practice-problems-and-solutions.md) | |
## Installations Setup & Env | |
- [python-setup](https://github.com/bgoonz/python-gitbook/blob/master/installations-setup-and-env/untitled.md) | |
- [Installing Python Modules](https://github.com/bgoonz/python-gitbook/blob/master/installations-setup-and-env/installing-python-modules.md) | |
## Aux-Exploration | |
- [Subject](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/README.md) | |
- [List Directory Contents](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/list-directory-contents.md) | |
- [Employee Manager](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/untitled-5.md) | |
- [OS Module](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/untitled-4.md) | |
- [server-side-scripting](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/untitled-3.md) | |
- [Reading and Writing to text files in Python](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/untitled-2.md) | |
- [General Data Structures](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/untitled-1.md) | |
- [Touple](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/touple.md) | |
- [How to round Python values to whole numbers?](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/untitled.md) | |
- [Python Array Module](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/python-array-module.md) | |
- [Data Structures In JavaScript](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/data-structures-in-javascript.md) | |
- [Dunder Methods](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/dunder-methods.md) | |
- [Python GitHub API](https://github.com/bgoonz/python-gitbook/blob/master/aux-exploration/subject/python-github-api.md) | |
--- | |
--- | |
# Website URLS: | |
These verify and allow you to make requests to the Twitter API. | |
API Key | |
ibWHTMh9TrF4l3Fx4khVRohYH | |
Copy | |
API Key Secret | |
QEMY8zvfHJiOXok57gpGX238OrM4wqkTdtgicmSOp8TC9O85PQ | |
Copy | |
Bearer Token | |
AAAAAAAAAAAAAAAAAAAAAPeeWAEAAAAA3SN2v5ZFQwpUKd9uHtu2NEjElH0%3DPAdNM4pQB4M1fqaHpCABTQIJXUocphGPaO8AIYsdvUzL7Y3PJp | |
Copy | |
C:/WINDOWS/System32/wsl.exe | |
VSCode Regex for chineese characters: [一-龥] | |
C:\Users\bryan\AppData\Local\Microsoft\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\ubuntu.exe | |
OAUTHTOKEN: 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 | |
npm i @bgoonz11/repoutils | |
npm i prettier -g | |
prettier --write . | |
-----------------------------------------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 | |
--------------------------------------------------------------------------------------------------------- | |
Install node modules recursevly ( npm i -g recursive-install ): | |
npm-recursive-install | |
---------------------------------------------------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 -- {} + | |
git pull | |
git init | |
git add . | |
git commit -m"update" | |
git push -u origin master | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name 'node_modules' -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 '{}' + | |
----------------------------------------------Remove Spaces In File/Folder Names----------------------------------------------------------- | |
find . -name "* *" -type d | rename 's/ /_/g' | |
find . -name "* *" -type f | rename 's/ /_/g' | |
find . -name "* *" -type d | rename 's/#/_/g' | |
find . -name "* *" -type f | rename 's/.html//g' | |
------------------------------------Truncate folder names down to 12 char------------------------------------------------------------------------ | |
for d in ./*; do mv $d ${d:0:12}; done | |
-------------------------------------Remove Numbers From File Names------------------------------------------------------------------------ | |
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 | |
#!/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' {} + | |
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 [[ ${#filename} < 9 ]]; then | |
echo ${filename:0:8}.${ext} | |
else | |
echo $1 | |
fi | |
rename 's/^(.{10}).*/$1/' * | |
------------------------------------------- | |
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 | |
#!/bin/bash | |
for file in *.md.md | |
do | |
mv "${file}" "${file%.md}" | |
done | |
find . -type f -exec rename's/\.js\.download$/.js/' *.js\.download ' {} + | |
#!/bin/bash | |
num=1 | |
length=16 | |
for file in '.' | |
do | |
newname=$file | |
until [[ ! -f $newname ]] | |
do | |
(( sublen = length - ${#num} )) | |
printf -v newname '%.*s%d' "$sublen" "$file" "$num" | |
(( num++ )) | |
done | |
mv "$file" "$newname" | |
done | |
sed 's/\/.*\/.*\/.*\/\(.*\)/~\/\1/g' * | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
https://www.google.com/maps/search/Please+join+your+Zoom+Interview+using+the+following+link+at+the+scheduled+time:+https:%2F%2Fus04web.zoom.us%2Fj%2F5491871343%3Fpwd%3DUVBxQlZ1VEh2b0cvQ25adm5ob3B3UT09?hl=en | |
: https://us04web.zoom.us/j/5491871343?pwd=UVBxQlZ1VEh2b0cvQ25adm5ob3B3UT09 | |
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 pdf-experiment | |
git init | |
git add . | |
git commit -m"update" | |
git push -u origin preview | |
--------------------------------------------------------------------------------------------------------- | |
git pull keeping local changes: | |
git stash | |
git pull | |
git stash pop | |
--------------------------------------------------------------------------------------------------------- | |
clone all of a user's git repositories | |
CNTX={users}; NAME={willjw3}; 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 | |
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 -- {} + | |
CNTX={users}; NAME={bgoonz}; 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={bgoonz}; 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={hasura}; 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 | |
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/learnwithjason/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/chartjs/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 3 >README.md | |
tree -f -I 'node_modules' >listing-path.md | |
tree -f -I 'node_modules' -d >TREE.md | |
tree -f >README.md | |
full path: | |
tree -f ~/ | |
--------------------------------------------------------------------------------------------------------- | |
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} + | |
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} + | |
--------------------------------------------------------------------------------------------------------- | |
sudo npm i prettier -g | |
prettier --write . | |
"pretty": "prettier --write \"./**/*.{js,jsx,py,md,html,css}\"" | |
Format Python: | |
black . | |
--------------------------------------------------------------------------------------------------------- | |
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"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
Remove lines contaning string: | |
sudo sed -i '/githubusercontent/d' ./*sandbox.md | |
sudo sed -i '/github\.com/d' ./*out.md | |
sudo sed -i '/author/d' ./* | |
--------------------------------------------------------------------------------------------------------- | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous"> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script> | |
https://bgoonz-blog.netlify.app/ | |
<iframe id="inlineFrameExample" | |
title="Inline Frame Example" | |
frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true" | |
width="800" | |
height="800" | |
src="https://deploy-preview-5--jolly-austin-0c1a1d.netlify.app/organizer"> | |
</iframe> | |
--------------------------------------------------------------------------------------------------------- | |
https://replit.com/@bgoonz/Data-Structures-Algos-Codebase | |
https://repl.it/@bgoonz/Data-Structures-Algos-Codebase?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/node-db1-project?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/interview-prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://repl.it/@bgoonz/Database-Prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
https://replit.com/@bgoonz/express-sqlite-app#src/routes/indexRoute.js | |
https://replit.com/@bgoonz/SQLite-starter-Template-Jam#main.sql | |
https://replit.com/@bgoonz/interview-prac#66-plus-one.js | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/stargazers/d' ./repo.txt | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/right\.html/d' ./right.html | |
--------------------------------------------------------------------------------------------------------- | |
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" | |
# usage: | |
# - zipdir thedir | |
# - zip thedir -x "**anotherexcludedsubdir/*" (important the double quotes to prevent glob expansion) | |
# if in windows/git-bash, add 'zip' command this way: | |
# https://stackoverflow.com/a/55749636/1482990 | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
--------------------------------------------------------------------------------------------------------- | |
https://blog-w-comments.vercel.app/ | |
------------------------------------------------GIT--------------------------------------------------------- | |
------------------------------------------------GIT--------------------------------------------------------- | |
------------------------------------------------GIT--------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
OVERWRITE LOCAL CHANGES: | |
Important: If you have any local changes, they will be lost. With or without --hard option, any local commits that haven't been pushed will be lost.[*] | |
If you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected. | |
First, run a fetch to update all origin/<branch> refs to latest: | |
git fetch --all | |
Backup your current branch: | |
git branch backup-master | |
Then, you have two options: | |
git reset --hard origin/master | |
OR If you are on some other branch: | |
git reset --hard origin/<branch_name> | |
Explanation: | |
git fetch downloads the latest from remote without trying to merge or rebase anything. | |
Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master | |
Remove Submodules: | |
git submodule deinit | |
-------------------------------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/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 '<MESSAGE>' ; 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: | |
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe", | |
--------------------------------------------------------------------------------------------------------- | |
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----------------------------------------------------------------- | |
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 | |
curl -X GET \ | |
https://api.cacher.io/integrations/show_all \ | |
-H 'cache-control: no-cache' \ | |
-H 'x-api-key: PWzD5TYgjTNGiynMmZu1tZuB' \ | |
-H 'x-api-token: TpaYdFiT7m4grnejMpWXA5aF' > exported_data.json | |
------------------------------------------- | |
---------------------------------------Trouble Shooting------------------------------------------------------------------ | |
input/Output error | |
wsl.exe --shutdown | |
Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
ln -s "$(pwd)" ~/Downloads | |
-------------------------------------------- | |
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 $ZipFiles) { | |
Write-Progress -Activity "Unzipping to $($UnzipPath)" -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status "File $($Progress) of $($ZipFiles.Count)" | |
$ZipFolder = $Shell.NameSpace($ZipFile.fullname) | |
$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 | |
mdt-docs | |
--------------------------------------------------------------------------------------------------------- | |
---------------------------------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 <mydir> -type f -exec sed -i 's/<string1>/<string2>/g' {} + | |
find . -type f -exec rename 's/-master//g' {} + | |
find . -type f -exec rename 's/-theme//g' {} + | |
find . -type f -exec rename 's/-free//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 | |
---------------------------------------------------------------------------------------------------------- | |
---------------------------------------------------------------------------------------------------------- | |
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 | |
find . -name "*.tgz" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
--------------------------------------------------------------------------------------------------------- | |
PRISM: | |
<script async defer src="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/misc/web-dev-utils/personal-utilities/prism/prism.js"></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/prism.css"> | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
} | |
} | |
} | |
--------------------------------------------------------------------------------------------------------- | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/xGZSWvFess8?start=2" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="./prism.css"> | |
<script async defer src="./prism.js"></script> | |
</head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------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 *.md -print0 | xargs -0 -I file cat file > merged.file.md | |
pandoc *.md > final.md | |
find . -name *.html -exec cat {} + > merged.file.html | |
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 *.md; do cat "${f}"; echo; done > output.md | |
for f in *.js; do cat "${f}"; echo; done > output.js | |
--------------------------------------------------------------------------------------------------------- | |
Flatten all sub folders into one folder contaning files. | |
find ./ -mindepth 1 -type f -exec mv -t ./ --backup=t '{}' + | |
------------------------ | |
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} \; | |
find . -type f -exec sed -i '/\p{Han}/d' ./*.py {} \; | |
find . -exec sed -i .bak '/^\p{Han},.*/s//\p{Han},/' {} \; | |
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 <span class=\x27author\x27>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<p>Document generated by Confluence on/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/miguelgrinberg/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Author/d' ./*.html {} \; | |
find . -type f -exec sed -i '/class="column-list"/d' ./index.html {} \; | |
find . -type f -exec sed -i '/Added by HTTrack/d' ./*.html {} \; | |
--------------------------------------------------------------------------------------------------------- | |
rename -n 's/(.*).{1}/$1/' * | |
rename -n 's/.{1}$//' * | |
rename -n 's/(.*).{1}/$1/' * | |
find . -maxdepth 1 -type d -name '?????????????*' -exec rename -n 's/.{1}$//' {} + | |
for i in *.; do | |
mv "$i" "${i:0:-1}" | |
done | |
git add . | |
git commit -m "update" | |
git push -u origin master | |
--------------------------------------------------------------------------------------------------------- | |
firstname-lastname-day2 | |
git remote remove origin | |
--------------------------------------------------------------------------------------------------------- | |
Download website with wget: | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off | |
--------------------------------------------------------------------------------------------------------- | |
find . -name "*.xml" -type f -print | |
s | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
youtube-dl https://www.youtube.com/user/Mihirishere/videos | |
youtube-dl https://www.youtube.com/user/norwex/videos | |
--------------------------------------------------------------------------------------------------------- | |
Remove duplicate lines from a text file | |
You can use this shell command: | |
COPY | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
httrack --ext-depth=2 | |
httrack --ext-depth=2 https://kathyguner.norwex.biz/ | |
httrack https://kathyguner.norwex.biz/ | |
httrack --ext-depth=3 https://www.textfixer.com/html/convert-url-to-html-link.php | |
httrack http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html -O "./temp" %e5 | |
httrack --ext-depth=4 http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html | |
httrack --ext-depth=4 https://www.vickielasher.com/ | |
--------------------------------------------------------------------------------------------------------- | |
grab all links from website | |
lynx -dump https://distrokid.com/hyperfollow/mihirbeg/getting-there | awk '/http/{print $2}' > links2.txt | |
lynx -dump https://geeksforgeeks.org/top-10-useful-github-repos-that-every-developer-should-follow | awk '/http/{print $2}' > links.md | |
lynx -dump https://html.com/blog/100-web-development-cheat-sheets | awk '/http/{print $2}' > links.md | |
wget -qO- www.instagram.com/mihirbeg/ | | |
grep -Eoi '<a [^>]+>' | | |
grep -Eo 'href="[^\"]+"' | | |
grep -Eo '(http|https)://[^/"]+'>output.md | |
--------------------------------------------------------------------------------------------------------- | |
GitFlow_-_step_by_step_a5dcb946b01f4d66be259ba33733763b | |
.*(?<=<script)(.*)(?=<\/script>).* | |
.*\./\.git.* | |
.*node_modules.* | |
find . -name "*.zip" -type f -print | |
find . -name "*.zip" -type f -print -delete | |
find . -name "*.gitignore" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
REMOVE DUPLICATE LINES: | |
uniq -u input.txt output.txt | |
uniq -u resources.html output.html | |
uniq -u testOut.html TESTOUT.html | |
--------------------------------------------------------------------------------------------------------- | |
2.)find and delete all empty directories()===> | |
find . -empty -type d -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
3.)Find and delete all empty files()===> | |
find . -empty -type f -print -delete | |
add extension to every file in folder | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.py \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.png \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.md \; | |
for f in * ; do | |
mv "$f" "$f.md" | |
done | |
for f in * ; do | |
mv "$f" "$f.html" | |
done | |
for f in * ; do | |
mv "$f" "$f.css" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
delete lines contaning specific string: | |
sed -i '/normalizerEmpty/d' ./js-in-one-page.html | |
sed -i '/\.git/d' ./index.html | |
sed -i '/\.github/d' ./combined.md | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" \) -a -exec sed -i '/BADSTRING/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*scrap3.md" \) -a -exec sed -i '/stargazers/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" -o -name "*.php" \) -a -exec sed -i '/MIT/d' '{}' + | |
find . -type f -a -exec sed -i '/author/d' '{}' + | |
find . -type f -a \( -name "*.html" -o -name "*.md" \) -a -exec sed -i '/[Source]/d' '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/Author/d' ./*.html | |
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 '/\.git/d' ./index.html | |
sudo sed -i '/assets/d' ./index.html | |
sudo sed -i '/stargazers/d' ./scrap3.md | |
--------------------------------------------------------------------------------------------------------- | |
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' | |
sed -n '/author/!p' file | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
find . -name "*" -type f | xargs sed -i -e '/Mirrored from/d' | |
--------------------------------------------------------------------------------------------------------- | |
print out the path of every file recursivley | |
ls -R './' | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }'>listing.md | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
sed -n -e '/<script>/,/<\/script>/p' getting-there.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<script>/,/<\/script>/p' *.html >out.js ./* {} \; | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<code class="sourceCode javascript">/,/<\/code>/p' *.html >out.html ./* {} \; | |
find . -type f -exec sed -n -e '/```js/,/```/p' *.html >out.js ./* {} \; | |
sed -i 's/<script>//g' out.js | |
sed -i 's/<\/script>//g' out.js | |
.*\./<script* | |
(?<=<script)(.*)(?=<\/script>) | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/ <div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html | |
sudo sed -i '/ <a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a>/d' ./*.html | |
sudo sed -i '/ Document generated by Confluence on/d' ./*.html | |
--------------------------------------------------------------------------------------------------------- | |
Resursivley delete node modules | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name 'description\.txt' -type d -prune -exec rm -rf '{}' + | |
/workspace/my-gists/TESTING/description.txt | |
find . -name '\.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
5.) Remember Git Credentials: | |
git config --global credential.helper store | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
------------------ | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_website-components/0-DOJO/widgets-master/output/info/stats.json' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_00-4-all-time/_0-Random-Repo/zipped.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_NOTES/database-notes/repl.it-sql/repl.it - SQL/SQLIntroductions.mp4' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_f95b7cbda3503d5d3f539e0c8401209c6f7c0c91f6ae2fa510a6efcaeaf697ef' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_7-assets/Past-Cohort/LambdaSchool-master.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_PDFS/Head_First_Csharp.pdf' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch git filter-branch --index-filter 'git rm -r | |
--cached --ignore-unmatch assets/_index.html' HEAD' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
nano | |
When you're done, hit CTRL+O to save and CTRL+X to exit Nano. You'll just need to restart the SSH server with one of the following commands. | |
$ systemctl restart sshd | |
$ service sshd restart | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley Create numbered folders: | |
n=1; | |
max=50; | |
while [ "$n" -le "$max" ]; do | |
mkdir "s$n" | |
n=`expr "$n" + 1`; | |
done | |
--------------------------------------------------------------------------------------------------------- | |
Command Line: Rename all files in current directory to a certain file extension: | |
forfiles /S /M * /C "cmd /c rename @file @fname.js" | |
forfiles /S /M * /C "cmd /c rename @file @fname.html" | |
forfiles /S /M * /C "cmd /c rename @file @fname.md" | |
forfiles /S /M * /C "cmd /c rename @file @fname.java" | |
--------------------------------------------------------------------------------------------------------- | |
The following command would rename all *.txt files to *.doc. | |
$ rename 's/\.txt$/.doc/' *.txt | |
rename 's/\.txt$/.js/' *.txt | |
$ rename 's/\.example$/.sql/' *.example | |
rename 's/\.js\.download$/.js/' *.js\.download | |
find . -name "*.htm" -exec rename 's/\.htm$/.html/' '{}' + | |
find . -name "*.\.js\.download" -exec rename 's/\.js\.download$/.js/' '{}' + | |
echo "</body></html>" | tee -a *.html | |
rename 's/\.html\.tmp$/.html/' *.html\.tmp | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
------------------------------------From html >md below--------------------------------------------------------------------- | |
pandoc --wrap=none --from html --to markdown_strict | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc "${0}" -o "${0%.html}.md"' {} \; | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley list every single file in the working directory... 1 per line: | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
write-to-txt-file | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
--------for only html-files------------------------------------------------------------------------------ | |
find ./ | grep -i "\.html*$" | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
forfiles /S /M *.File /C "cmd /c rename @file @fname.js" | |
--------------------------------------------------------------------------------------------------------- | |
Recreate folder structure with only specific file types | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './..' | |
find . -type f -name '*.png' | cpio -p -d -v './_ext' | |
find . -name '*.README.md' | cpio -pdm './extension-readme' | |
find . -name '*.md' | cpio -pdm './../Markdown' | |
find . -name '*.git' | cpio -pdm './GIT-FOLDERS' | |
--------------------------------------------------------------------------------------------------------- | |
7.) ()===> | |
--------------------------------------------------------------------------------------------------------- | |
8.) Command Prompt: code --list-extensions | |
for /F "tokens=*" %A in (extensions.list) do code --install-extension %A | |
--------------------------------------------------------------------------------------------------------- | |
9.)Create a soft link in the home dir | |
ln -s /mnt/c/0-a-A-October | |
--------------------------------------------------------------------------------------------------------- | |
10.) | |
sudo apt update | |
sudo apt upgrade | |
git config --global user.name bryan | |
git config --global user.email [email protected] | |
sudo apt update | |
sudo apt install build-essential | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
. ./.bashrc | |
nvm install --lts | |
sudo apt install unzip | |
npm install -g mocha | |
npm audit fix -F | |
npm audit fix -f | |
npm install -g mocha | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install python3 | |
----------------------------------------------------------------------------------------------------------- | |
Command Line vscode | |
code --list-extensions | |
code --disable-extension <ext-name> | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
dockerd | |
----------------------------------------------------------------------------------------------------------- | |
killall node | |
----------------------------------------------------------------------------------------------------------- | |
sudo service postgresql stop | |
sudo service postgresql start | |
sudo service postgresql restart | |
---------------------------------------- | |
sed -e '/.git/ { | |
$!N | |
d | |
}'index.html | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. | |
--restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
--domains yoursite.com \ # Do not follow links outside this domain. | |
--no-parent \ # Don't follow links outside the directory you pass in. | |
https://www.instagram.com/mihirbeg/?hl=en | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://soybean-tulip-em56.squarespace.com/config/pages | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://cheatography.com/davechild/cheat-sheets/regular-expressions/ | |
https://ankiweb.net/decks/ | |
----------------------------------------------------------------------------------------------------------- | |
cat * > ./merged-file.html | |
find . -type f -exec 'pandoc -s *.docx -t markdown -o example35.md' {} \; | |
pandoc -s *.docx -t markdown -o example35.md | |
pandoc -s *.docx > output.md | |
Copy file structure without the files: | |
rsync -a -f"+ */" -f"- *" './'/ './structure/'/ | |
rsync -a -f"+ */" -f"- *" ./ ./../folder/ | |
rsync -a -f"+ */" -f"- *" source/ destination/ | |
----------------------------------------------------------------------------------------------------------- | |
Remove Script tags and their content: | |
find ./ -iname "*.html" -type f -exec sh -c 'sed "/<script/,/<\/script>/d" *.html' {} \; >testOut.html | |
----------------------------------------------------------------------------------------------------------- | |
cat *.html > node-mod-readme.html | |
----------------------------------------------------------------------------------------------------------- | |
Powershell remove numbers and dashes from file names: | |
Dir | Rename-Item –NewName { $_.name –replace " ","_" } | |
Dir | Rename-Item –NewName { $_.name –replace "1","" } | |
Dir | Rename-Item –NewName { $_.name –replace "2","" } | |
Dir | Rename-Item –NewName { $_.name –replace "3","" } | |
Dir | Rename-Item –NewName { $_.name –replace "4","" } | |
Dir | Rename-Item –NewName { $_.name –replace "5","" } | |
Dir | Rename-Item –NewName { $_.name –replace "6","" } | |
Dir | Rename-Item –NewName { $_.name –replace "7","" } | |
Dir | Rename-Item –NewName { $_.name –replace "8","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "-","" } | |
Dir | Rename-Item –NewName { $_.name –replace "0","" } | |
----------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
sudo sed -i '/:::/d' ./*.mc | |
sudo sed -i '/Blog at WordPress/d' ./index.html | |
find . -type f -exec sed -i '/Blog at WordPress/d' ./* {} \; | |
sudo sed -i '/right\.html/d' ./index.html | |
find . -type f -exec sed -i '/walkthrough/d' ./* {} \; | |
sudo sed -i '/walkthrough/d' ./*.html | |
sudo sed -i '/node_modules/d' ./sitemap.html | |
sudo sed -i '/"raw_url":/!d' ./my-gists.json | |
sudo sed -i '/index\.html/!d' ./index.html | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/sol\~/d' ./right.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
sudo sed -i '/\.svg/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.jpg/d' ./index.html | |
sudo sed -i '/\.scss/d' ./index.html | |
sudo sed -i '/scss/d' ./index.html | |
sudo sed -i '/\.txt/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.pdf/d' ./index.html | |
sudo sed -i '/\.mp4/d' ./index.html | |
sudo sed -i '/\.pug/d' ./index.html | |
sudo sed -i '/\.DS_store/d' ./index.html | |
sudo sed -i '/\.DS_Store/d' ./index.html | |
sudo sed -i '/\.sql/d' ./index.html | |
sudo sed -i '/\.py/d' ./index.html | |
sudo sed -i '/\.xlsx/d' ./index.html | |
sudo sed -i '/\.JPG/d' ./index.html | |
sudo sed -i '/\.TTF/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.eot/d' ./index.html | |
sudo sed -i '/\.ttc/d' ./index.html | |
sudo sed -i '/\.PNG/d' ./index.html | |
sudo sed -i '/\.java/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.go/d' ./index.html | |
sudo sed -i '/\.vue/d' ./index.html | |
sudo sed -i '/clone_url/!d' ./scrap.md | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="sitemap.html" | |
out="basename $out.html" | |
html="sitemap.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
prettier --write . | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
npm audit fix --force | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
npm install | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
sudo sed -i '/Blog at WordPress/d' ./*.html | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
---------------------------------------------------------------------------------------------------------- | |
mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g') | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
find . -type f -exec sed -n -e '/```javascript/,/```/p' *.html >out.js ./* {} \; | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
--------------------------------------------Sanatize-------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g') | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
---------------------------------------------------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
npm run develop | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
#!/bin/bash | |
( | |
IFS=$'\n' | |
for y in $(ls $1) | |
do | |
mv $1/`echo $y | sed 's/ /\\ /g'` $1/`echo "$y" | sed 's/ /_/g'` | |
done | |
) | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for file in *; do mv "$file" `echo $file | tr '_' '.'` ; done | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for file in *; do mv "$file" `echo $file | tr '_' '.'` ; done | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
---------------------------------------------------------------------------------------------------------- | |
----------------------------------------------------------------------------------------------------------- | |
<pre><code> | |
#!/bin/bash | |
link="#insert url here#" | |
#links were a set of strings with just the index of the video as the variable | |
num=3 | |
#first video was numbered 3 - weird. | |
ext=".mp4" | |
while [ $num -le 66 ] | |
do | |
wget $link$num$ext -P ~/Downloads/ | |
num=$(($num+1)) | |
done | |
</code></pre> | |
----------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/{#3585 \.graf \.graf--mixtapeEmbed \.graf-after--p /d' ./*.md | |
print a dummy text file in each folder | |
for x in "./"/*/; do | |
(cd "$x" | |
files=(*) | |
printf '%s\n' "${files[@]}" > deleteme.txt | |
) | |
done | |
----------------------------------------------------------------------------------------------------------- | |
download all links of given file type | |
wget -r -A.pdf https://overapi.com/git | |
----------------------------------------------------------------------------------------------------------- | |
for file in *. | |
do | |
sudo sed -i '/Copyright/d' ./*.html | |
done | |
sudo sed -i '/Support/d' ./*.html | |
sudo sed -i '/MIT/d' ./*.html | |
sudo sed -i '/License/d' ./*.html | |
sudo sed -i '/Contributors/d' ./*.html | |
sudo sed -i '/Copyright/d' ./*.html | |
sudo sed -i '/copyright/d' ./*.html | |
sudo sed -i '/Copyright © /d' ./*.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Remove any lines not contaning string text or blah | |
sudo sed -i '/\.html/!d' scrap.md | |
sudo sed -i '/\.html/!d' index.html | |
sudo sed -i '/\.js/!d' ./SCRAP.html | |
sudo sed -i '/CODE-MIRROR/d' ./resources.html | |
sudo sed -i '/!\[\](/d' ./lecture-notes.md | |
sudo sed -i '/\.html/d' ./index.html | |
sudo sed -i '/Exported from/d' ./*.html | |
sudo sed -i '/src="data:image/d' ./everyonescodepens.html | |
--------------------------------------------------------------------------------------------------------- | |
# Reinstall all npm packages | |
npm i npm-reinstall | |
reinstall | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/127/d' ./scrap.md | |
--------------------------------------------------------------------------------------------------------- | |
Delete Files Over certain Size: | |
find . -size +75M -a -print -a -exec rm -f {} \; | |
find . -size +98M -a -print -a -exec rm -f {} \; | |
ompare across forks, base-fork -> main). | |
find . -size +75M -a -exec rm -f {} \; | |
--------------------------------Recursivly pull and accept incomming merge changes------------------------------------------------------------------------- | |
<body> | |
<a href="https://github.com/bgoonz" class="github-corner" | |
aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" | |
style="z-index: 100000; fill:#194ccdaf; color:#fff; position: fixed; top: 20px; border: 0; left: 20px; transform: scale(-1.5, 1.5);" | |
aria-hidden="true"> | |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | |
<path | |
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" | |
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"> | |
</path> | |
<path | |
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" | |
fill="currentColor" class="octo-body"></path> | |
</svg></a> | |
1865 | |
git pull -s recursive -X ours https://github.com/Web-Dev-Collaborative/archive-backup.git | |
git pull -s recursive -X ours https://github.com/bgoonz/Lambda.git | |
git pull -s recursive -X theirs url | |
git pull -s recursive -X theirs https://github.com/bgoonz/Lambda.git | |
--------------------------------------------------------------------------------------------------------- | |
Overwrite local repo: | |
git fetch origin | |
git reset --hard origin/master | |
--------------------------------------------------------------------------------------------------------- | |
Add text to the first line of every file of a certain extension in a given folder. | |
for f in *.txt; do printf '%s\n' 0a 'TEXT YOU WISH TO APPEND TO BEGINNING OF EVERY FILE' . x | ex "$f"; done | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------------------------How to add to end of file:------------------------------------------------------ | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
Recursive NPM install: | |
Usage | |
$ npm-recursive-install | |
--------------------------------------------------------------------------------------------------------- | |
for filename in *mesibo*; do echo mv \"$filename\" \"${filename//mesibo/zumzi}\"; done > rename.md | |
for filename in *mesibo*; do mv "$filename" "${filename//mesibo/zumzi}"; done | |
for d in */ ; do | |
echo "$d" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
<form action="https://liveformhq.com/form/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5" method="POST" accept-charset="utf-8"> | |
<input type="hidden" name="_utf8" value="✓"> | |
<!-- | |
NOTE: This is an optional field, if your form has a field named '_redirect', | |
The user will be redirected to this page after the submission is saved | |
--> | |
<input type="hidden" value="https://liveformhq.com/thank_you" name="_redirect" /> | |
<label for="name">Name</label> | |
<input type="text" id="name" name="name"> <br /> | |
<label for="email">Email</label> | |
<input type="text" id="email" name="email"> <br /> | |
<button type="submit">Submit</button> | |
</form> | |
--------------------------------------------------------------------------------------------------------- | |
Input Output error | |
wsl.exe --shutdown then Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
Replace the string source with target in all files in the current directory and all sub-directories: | |
find . -type f -exec rename 's/source/target/' {} \; | |
Replace the string source with target in all directories in the current directory and all sub-directories: | |
find . -type d -exec rename 's/source/target/' {} \; | |
find . -type f -exec rename 's/\_/-/' {} \; | |
find . -type f -exec rename 's/\_gif//' {} \; | |
find . -type f -exec rename 's/\_jpg//' {} \; | |
find . -type f -exec rename 's/\.svg//' {} \; | |
find . -type f -exec rename 's/\~/\-/' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
I use this one-liner to remove invalid characters in subtitle files: | |
for f in *.srt; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
Only process *.srt files( * could be used in place of *.srt to process every file) | |
Removes all other characters except for letters A-Za-z, numbers 0-9, periods ".", and dash's "-" | |
Removes possible double or triple periods | |
Checks to see if the file name needs changing | |
If true, it renames the file with the mv command, then outputs the changes it made with the echo command | |
It works to normalize directory names of movies: | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.]/./g' -e 's/\.\.\././g' -e 's/\.\././g' -e 's/\.*$//'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
--------------------------------------------------------------------------------------------------------- | |
To remove any number of trailing spaces from file names you can use rename (prename) : | |
rename 's/ *$//' * | |
find ./ -type f -exec rename 's/ *$//' *' {} \; | |
find ./ -type d -exec rename 's/ *$//' * {} \; | |
--------------------------------------------------------------------------------------------------------- | |
This shell script sanitizes a directory recursively, to make files portable between Linux/Windows and FAT/NTFS/exFAT. It removes control characters, /:*?"<>\| and some reserved Windows names like COM0. | |
sanitize() { | |
shopt -s extglob; | |
filename=$(basename "$1") | |
directory=$(dirname "$1") | |
filename_clean=$(echo "$filename" | sed -e 's/[\\/:\*\?"<>\|\x01-\x1F\x7F]//g' -e 's/^\(nul\|prn\|con\|lpt[0-9]\|com[0-9]\|aux\)\(\.\|$\)//i' -e 's/^\.*$//' -e 's/^$/NONAME/') | |
if (test "$filename" != "$filename_clean") | |
then | |
mv -v "$1" "$directory/$filename_clean" | |
fi | |
} | |
export -f sanitize | |
sanitize_dir() { | |
find "$1" -depth -exec bash -c 'sanitize "$0"' {} \; | |
} | |
sanitize_dir './' | |
sanitize_dir './' | |
---------------------------------------------------OR------------------------------------------------------------ | |
#!/bin/bash | |
function sanitize_file_name { | |
echo -n $1 | perl -pe 's/[\?\[\]\/\\=<>:;,''"&\$#*()|~`!{}%+]//g;' -pe 's/[\r\n\t -]+/-/g;' | |
} | |
filename="Wh00t? it's a -- re@lly-weird {file&name} (with + Plus and__1% #of# [\$qRots\$!]).mov" | |
cleaned=$(sanitize_file_name "$filename") | |
echo original : "$filename" | |
echo sanitised: "$cleaned" | |
--------------------------------------------------------------------------------------------------------------- | |
Center-Line | |
<hr> | |
<center> | |
<img | |
src="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/23b9b236-746e-409c-8e86-30b4385e3b72/hr1-raypham.gif" | |
alt="hr-line" width="781" height="22"> | |
<p class="text spotlight">Documentation</p> | |
</center> | |
<hr> | |
--------------------------------------------------------------------------------------------------------------- | |
const findUp = require('find-up'); | |
findUp('test.html').then(filepath => { | |
console.log(filepath); | |
}); | |
--------------------------------------------------------------------------------------------------------------- | |
Extract TGZ | |
for file in `ls -1`; do | |
sudo tar -xvf "${file}" ; done | |
function extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; | |
*.tar.gz) tar xvzf $1 ;; | |
*.tar.xz) tar Jxvf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xvf $1 ;; | |
*.tbz2) tar xvjf $1 ;; | |
*.tgz) tar xvzf $1 ;; | |
*.zip) unzip -d `echo $1 | sed 's/\(.*\)\.zip/\1/'` $1;; | |
*.Z) uncompress $1 ;; | |
*.7z) 7z x $1 ;; | |
*) echo "don't know how to extract '$1'" ;; | |
esac | |
else | |
echo "'$1' is not a valid file!" | |
fi | |
} | |
find ./ -type f -name "*.tgz" -exec sudo tar -xvf "${file}" | |
-----------------------------Get tripple backtick code blocks---------------------------------------------------------------------------------- | |
sed -n '/^```/,/^```/ p' < input.file | |
--------------------------------------------------------------------------------------------------------------- | |
Recursivley remove files by name: | |
find . -name hts-log.txt -type f -exec rm -rf {} \; | |
find . -name cookies.txt -type f -exec rm -rf {} \; | |
find . -name fade.gif -type f -execcp rm -rf {} \; | |
find . -name right.html -type f -exec cp rm -rf {} \; | |
Recursivley remove folders by name. | |
find . -type f -exec sed -i '/Mirrored from/d' ./* {} \; | |
find . -type f -exec sed -i '/Exported from /d' ./* {} \; | |
find . -type f -exec sed -i '/define/d' ./* {} \; | |
--------------------------------------------------------------------------------------------------------------- | |
Passionate Web Developer, Electrical Engineer, Audio Engineer and Musician / Teacher! A passionate Web Developer, Electrical Engineer, Musician & Producer 🔭 Contract Web Development Relational Concepts 🌱 I’m currently learning React/Redux, Python, Java, Express, jQuery 👯 I’m looking to collaborate on Any web audio or open source educational tools. 🤝 | |
--------------------------------------------------------------------------------------------------------------- | |
error: refs/remotes/origin/depfu/update/core-siteother-pagesweeksweek-10sequelize-recipe-box-solution/npm/pug-3.0.2 does not point to a valid object! | |
#!/bin/sh | |
set -e | |
if [ $# -eq 0 ]; then | |
dir="." | |
else | |
dir="$1" | |
fi | |
if [ ! -d "$dir" ]; then | |
echo "not a dir: $dir" | |
exit 1 | |
fi | |
if [ ! -d "$dir/.git" ]; then | |
echo "not a git repo: $dir" | |
exit 1 | |
fi | |
cd "$dir" | |
files=$(find .git/refs -type f) | |
for f in $files; do | |
id=$(cat "$f") | |
if ! git rev-parse --quiet "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing ref $f with missing commit $id" | |
rm "$f" | |
fi | |
done | |
if [ ! -f .git/packed-refs ]; then | |
exit 0 | |
fi | |
packfiles=$(cat .git/packed-refs \ | |
| grep -v '#' \ | |
| awk '{print $2}') | |
for f in $packfiles; do | |
if ! git rev-parse --quiet --verify "$f" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
id=$(git rev-parse "$f") | |
if ! git rev-parse --quiet --verify "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing packed ref $f with missing commit $id" | |
git update-ref -d $f | |
fi | |
done | |
git config --system core.longpaths true | |
find . -name "* *" -type f | rename 's/.png.html.png/.png/g' | |
"C:\Users\bryan\AppData\Local\Microsoft\WindowsApps\ubuntu.exe" | |
\Users\\bryan\\AppData\\Local\\Microsoft\\WindowsApps\\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\\ubuntu2004.exe | |
-------------------------Authenticate with access token-------------------------------------------------------------------------------- | |
access-token: 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 | |
git remote set-url origin https://bgoonz:[email protected]/bgoonz/lebab-webview.git | |
git remote add origin https://bgoonz:[email protected]/bgoonz/lebab-webview.git | |
---------------------------------------------Produce Documentation------------------------------------------------------------ | |
docky src/**/*.js \ --watch "src/components/**/*.js","./README.md" \ --ignore "src/components/**/index.js" \ ignored files --use-readme=false | |
----------------------------------------------Remove remote origin----------------------------------------------------------- | |
git remote remove origin | |
--------------------------------------------------------------------------------------------------------- | |
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/ | |
--------------------------------------------------------------------------------------------------------- | |
npm i @bgoonz11/repoutils | |
npm i prettier -g | |
prettier --write . | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
-----------------------------------------------Git workflow---------------------------------------------------------- | |
git add . && git commit -m "update good" && git push | |
--------------------------------------------------------------------------------------------------------- | |
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 git push ; 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 | |
--------------------------------------------------------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
-----------------------------------------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 *.js; do cat "${f}"; echo; done > ./../Combined_____-_____Doc.md | |
for f in *.jsx; do cat "${f}"; echo; done > Combined_____-_____Doc.md | |
for f in *.py; do cat "${f}"; echo; done > Combined_____-_____Doc.md | |
-----------------------------------------------------------Github Corner-------------------------------------------------------------- | |
<a class="github-corner" href="https://github.com/bgoonz/" aria-label="View source on Github"> | |
<svg aria-hidden="true" width="40" height="40" viewbox="0 0 250 250" style=" | |
z-index: 100000; | |
fill: #000000af; | |
color: #fff; | |
position: fixed; | |
top: 0px; | |
border: 0; | |
left: 0px; | |
transform: scale(-1.5, 1.5); | |
"> | |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | |
<path class="octo-arm" | |
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" | |
fill="currentColor" style="transform-origin: 130px 106px"></path> | |
<path class="octo-body" | |
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" | |
fill="currentColor"></path> | |
</svg> | |
</a> | |
-------------------------------------------WGET DOWNLOAD WEBSITE-------------------------------------------------------------- | |
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://www.algolia.com/interface-demos/6ed0c3de-f9e4-4cc8-a7b2-c6c7c979cc5e?utm_medium=page_link&utm_source=dashboard | |
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://linktr.ee/ToxicFreeSimplyClean | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
sudo sed -i '/authors/d' ./*.md | |
find . -type f -exec sed -i '/authors/d' ./*. {} \; | |
---------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 | |
ln -s "$(pwd)" ~/Downloads | |
-------------------------------------------- | |
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 | |
------------------------------------Embed Repl.it--------------------------------------------- | |
<iframe frameborder="0" width="100%" height="500px" src=" ?lite=true"></iframe> | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
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 contaning certain numbers-------------caution-dangerous--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
find . -name '*.zip' -type f -prune -exec rm -- *[12345]* '{}' + | |
find . -name '*.png' -type f -prune -exec rm -- *[123456789]* '{}' + | |
find . -name '*.png' -type f -prune -exec rm -- *[45]* '{}' + | |
----------------------------------------------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 | |
-------------------------------------Find and replace file names-------------------------------------------------------------------- | |
find . -name "* *" -type f | rename 's/sitemap/index/g' | |
| |
find . -name "* *" -type f | rename 's///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 $d ${d:0:12}; done | |
-------------------------------------Remove Numbers From File Names------------------------------------------------------------------------ | |
#!/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 [[ ${#filename} < 9 ]]; then | |
echo ${filename:0:8}.${ext} | |
else | |
echo $1 | |
fi | |
rename 's/^(.{10}).*/$1/' * | |
------------------------------------------- | |
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 *.md.md | |
do | |
mv "${file}" "${file%.md}" | |
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 | |
!1 | |
[](link to your URL) | |
#!/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 $newname ]] | |
do | |
(( sublen = length - ${#num} )) | |
printf -v newname '%.*s%d' "$sublen" "$file" "$num" | |
(( num++ )) | |
done | |
mv "$file" "$newname" | |
done | |
sed 's/\/.*\/.*\/.*\/\(.*\)/~\/\1/g' * | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
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 init | |
git add . | |
git commit -m"update" | |
git push -u origin preview | |
--------------------------------------------------------------------------------------------------------- | |
git pull keeping local changes: | |
git stash | |
git pull | |
git stash pop | |
--------------------------------------------------------------------------------------------------------- | |
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={Web-Dev-Collaborative}; 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 | |
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 | |
full path: | |
tree -f ~/ | |
--------------------------------------------------------------------------------------------------------- | |
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} + | |
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://replit.com/@bgoonz/data-structures?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
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" | |
# usage: | |
# - zipdir thedir | |
# - zip thedir -x "**anotherexcludedsubdir/*" (important the double quotes to prevent glob expansion) | |
# if in windows/git-bash, add 'zip' command this way: | |
# https://stackoverflow.com/a/55749636/1482990 | |
--------------------------------------------------------------------------------------------------------- | |
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 '<MESSAGE>' ; 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: | |
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe", | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
ln -s "$(pwd)" ~/Downloads | |
-------------------------------------------- | |
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 $ZipFiles) { | |
Write-Progress -Activity "Unzipping to $($UnzipPath)" -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status "File $($Progress) of $($ZipFiles.Count)" | |
$ZipFolder = $Shell.NameSpace($ZipFile.fullname) | |
$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 js-snippets.md* | codedown js > code.js | |
cat interview Questions.md* | codedown javascript > code.js | |
cat README.md* | codedown js > 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 | |
mdt-docs | |
--------------------------------------------------------------------------------------------------------- | |
---------------------------------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 <mydir> -type f -exec sed -i 's/<string1>/<string2>/g' {} + | |
find . -type f -exec rename 's/-master//g' {} + | |
find . -type d -exec rename 's/-master//g' {} + | |
--------------------------------------------------------------------------------------------------------- | |
INSTEAD OF GIT PUSH _F :git reset --hard upstream/master | |
4895 | |
To display the current branch you're on, without the other branches listed, you can do the following: | |
git rev-parse --abbrev-ref HEAD | |
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 | |
https://i.imgur.com/i6VDHcd.png | |
https://bryan-guner.gitbook.io/my-docs/ | |
https://i.imgur.com/i6VDHcd.png | |
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 | |
find . -name "*.tgz" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
PUSH IN CHUNCKS: | |
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=10 | |
# check if the branch exists on the remote | |
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# # if so, only push the commits that are not on the remote already | |
# range=$REMOTE/$BRANCH..HEAD | |
# else | |
# # else push all the commits | |
# range=HEAD | |
# fi | |
range=HEAD | |
echo "Range: $r" | |
# count the number of commits to push | |
n=$(git log --first-parent --format=format:x $range | wc -l) | |
echo "Commits to push: $n" | |
# push each batch | |
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 | |
# push the final partial batch | |
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> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/prism.css"> | |
--------------------------------------------------------------------------------------------------------- | |
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 <span class=\x27author\x27>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<p>Document generated by Confluence on/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/miguelgrinberg/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Author/d' ./*.html {} \; | |
find -type f -name '*\-fr*' -delete | |
find -type f -name '*\-ja*' -delete | |
find -type f -name '*\-es*' -delete | |
find -type f -name '*\-de*' -delete | |
find -type f -name '*\-ru*' -delete | |
find -type f -name '*\-id*' -delete | |
find -type f -name '*\-pt*' -delete | |
find -type f -name '*\-zh*' -delete | |
find -type f -name '*\-fr*' -delete | |
find -type f -name '*\-fr*' -delete | |
find -type f -name '*\-fr*' -delete | |
find . -type f -exec sed -i '/class="column-list"/d' ./index.html {} \; | |
find . -type f -exec sed -i '/Added by HTTrack/d' ./*.html {} \; | |
--------------------------------------------------------------------------------------------------------- | |
rename -n 's/(.*).{1}/$1/' * | |
rename -n 's/.{1}$//' * | |
rename -n 's/(.*).{1}/$1/' * | |
find . -maxdepth 1 -type d -name '?????????????*' -exec rename -n 's/.{1}$//' {} + | |
for i in *.; do | |
mv "$i" "${i:0:-1}" | |
done | |
git add . | |
git commit -m "update" | |
git push -u origin master | |
--------------------------------------------------------------------------------------------------------- | |
firstname-lastname-day2 | |
git remote remove origin | |
--------------------------------------------------------------------------------------------------------- | |
Download website with wget: | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --adjust-extension -O -e robots=off https://bryan-guner.gitbook.io/my-docs/ | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off https://bryan-guner.gitbook.io/my-docs | |
--------------------------------------------------------------------------------------------------------- | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --adjust-extension -O -e robots=off https://web.dev | |
find . -name "*.xml" -type f -print | |
s | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
youtube-dl https://www.youtube.com/user/Mihirishere/videos | |
youtube-dl https://www.youtube.com/user/norwex/videos | |
--------------------------------------------------------------------------------------------------------- | |
Remove duplicate lines from a text file | |
You can use this shell command: | |
COPY | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
httrack --ext-depth=2 | |
httrack --ext-depth=2 https://kathyguner.norwex.biz/ | |
httrack https://kathyguner.norwex.biz/ | |
httrack --ext-depth=3 https://www.textfixer.com/html/convert-url-to-html-link.php | |
httrack http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html -O "./temp" %e5 | |
httrack --ext-depth=4 http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html | |
httrack --ext-depth=4 https://www.vickielasher.com/ | |
--------------------------------------------------------------------------------------------------------- | |
grab all links from website | |
lynx -dump https://distrokid.com/hyperfollow/mihirbeg/getting-there | awk '/http/{print $2}' > links2.txt | |
lynx -dump https://geeksforgeeks.org/top-10-useful-github-repos-that-every-developer-should-follow | awk '/http/{print $2}' > links.md | |
lynx -dump https://html.com/blog/100-web-development-cheat-sheets | awk '/http/{print $2}' > links.md | |
wget -qO- www.instagram.com/mihirbeg/ | | |
grep -Eoi '<a [^>]+>' | | |
grep -Eo 'href="[^\"]+"' | | |
grep -Eo '(http|https)://[^/"]+'>output.md | |
--------------------------------------------------------------------------------------------------------- | |
------------------------------------------------- | |
REMOVE DUPLICATE LINES: | |
uniq -u input.txt output.txt | |
uniq -u resources.html output.html | |
uniq -u testOut.html TESTOUT.html | |
--------------------------------------------------------------------------------------------------------- | |
2.)find and delete all empty directories()===> | |
find . -empty -type d -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
3.)Find and delete all empty files()===> | |
find . -empty -type f -print -delete | |
add extension to every file in folder | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.js \; | |
find . -type f -exec mv '{}' '{}'.md \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.png \; | |
find . -type f -exec mv '{}' '{}'.jpg \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.md \; | |
for f in * ; do | |
mv "$f" "$f.md" | |
done | |
for f in * ; do | |
mv "$f" "$f.html" | |
done | |
for f in * ; do | |
mv "$f" "$f.css" | |
done | |
for f in * ; do | |
mv "$f" "$f.jpg" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
delete lines contaning specific string: | |
sed -i '/normalizerEmpty/d' ./js-in-one-page.html | |
sed -i '/\.git/d' ./index.html | |
sed -i '/\.github/d' ./combined.md | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" \) -a -exec sed -i '/BADSTRING/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*scrap3.md" \) -a -exec sed -i '/stargazers/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" -o -name "*.php" \) -a -exec sed -i '/MIT/d' '{}' + | |
find . -type f -a -exec sed -i '/author/d' '{}' + | |
find . -type f -a \( -name "*.html" -o -name "*.md" \) -a -exec sed -i '/[Source]/d' '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/Author/d' ./*.html | |
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 '/\.git/d' ./index.html | |
sudo sed -i '/assets/d' ./index.html | |
sudo sed -i '/stargazers/d' ./scrap3.md | |
sed -n '/author/!p' file | |
find . -name "*" -type f | xargs sed -i -e '/Mirrored from/d' | |
--------------------------------------------------------------------------------------------------------- | |
print out the path of every file recursivley | |
ls -R './' | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }'>listing.md | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
sed -n -e '/<script>/,/<\/script>/p' getting-there.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<script>/,/<\/script>/p' *.html >out.js ./* {} \; | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<code class="sourceCode javascript">/,/<\/code>/p' *.html >out.html ./* {} \; | |
find . -type f -exec sed -n -e '/```js/,/```/p' *.html >out.js ./* {} \; | |
sed -i 's/<script>//g' out.js | |
sed -i 's/<\/script>//g' out.js | |
.*\./<script* | |
(?<=<script)(.*)(?=<\/script>) | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Resursivley delete node modules | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
5.) Remember Git Credentials: | |
git config --global credential.helper store | |
--------------------------------------------------------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
nano | |
When you're done, hit CTRL+O to save and CTRL+X to exit Nano. You'll just need to restart the SSH server with one of the following commands. | |
$ systemctl restart sshd | |
$ service sshd restart | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley Create numbered folders: | |
n=1; | |
max=50; | |
while [ "$n" -le "$max" ]; do | |
mkdir "s$n" | |
n=`expr "$n" + 1`; | |
done | |
--------------------------------------------------------------------------------------------------------- | |
Command Line: Rename all files in current directory to a certain file extension: | |
forfiles /S /M * /C "cmd /c rename @file @fname.js" | |
forfiles /S /M * /C "cmd /c rename @file @fname.html" | |
forfiles /S /M * /C "cmd /c rename @file @fname.md" | |
forfiles /S /M * /C "cmd /c rename @file @fname.java" | |
--------------------------------------------------------------------------------------------------------- | |
The following command would rename all *.txt files to *.doc. | |
$ rename 's/\.txt$/.doc/' *.txt | |
rename 's/\.txt$/.js/' *.txt | |
$ rename 's/\.example$/.sql/' *.example | |
rename 's/\.js\.download$/.js/' *.js\.download | |
find . -name "*.htm" -exec rename 's/\.htm$/.html/' '{}' + | |
find . -name "*.\.js\.download" -exec rename 's/\.js\.download$/.js/' '{}' + | |
echo "</body></html>" | tee -a *.html | |
rename 's/\.html\.tmp$/.html/' *.html\.tmp | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
------------------------------------From html >md below--------------------------------------------------------------------- | |
pandoc --wrap=none --from html --to markdown_strict | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc "${0}" -o "${0%.html}.md"' {} \; | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley list every single file in the working directory... 1 per line: | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
write-to-txt-file | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
--------for only html-files------------------------------------------------------------------------------ | |
find ./ | grep -i "\.html*$" | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
forfiles /S /M *.File /C "cmd /c rename @file @fname.js" | |
--------------------------------------------------------------------------------------------------------- | |
Recreate folder structure with only specific file types | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './..' | |
find . -type f -name '*.png' | cpio -p -d -v './_ext' | |
find . -name '*.README.md' | cpio -pdm './extension-readme' | |
find . -name '*.md' | cpio -pdm './../Markdown' | |
find . -name '*.git' | cpio -pdm './GIT-FOLDERS' | |
--------------------------------------------------------------------------------------------------------- | |
7.) ()===> | |
--------------------------------------------------------------------------------------------------------- | |
8.) Command Prompt: code --list-extensions | |
for /F "tokens=*" %A in (extensions.list) do code --install-extension %A | |
--------------------------------------------------------------------------------------------------------- | |
9.)Create a soft link in the home dir | |
ln -s /mnt/c/0-a-A-October | |
--------------------------------------------------------------------------------------------------------- | |
10.) | |
sudo apt update | |
sudo apt upgrade | |
git config --global user.name bryan | |
git config --global user.email [email protected] | |
sudo apt update | |
sudo apt install build-essential | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
. ./.bashrc | |
nvm install --lts | |
sudo apt install unzip | |
npm install -g mocha | |
npm audit fix -F | |
npm audit fix -f | |
npm install -g mocha | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install python3 | |
----------------------------------------------------------------------------------------------------------- | |
Command Line vscode | |
code --list-extensions | |
code --disable-extension <ext-name> | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
dockerd | |
----------------------------------------------------------------------------------------------------------- | |
killall node | |
----------------------------------------------------------------------------------------------------------- | |
sudo service postgresql stop | |
sudo service postgresql start | |
sudo service postgresql restart | |
---------------------------------------- | |
sed -e '/.git/ { | |
$!N | |
d | |
}'index.html | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. | |
--restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
--domains yoursite.com \ # Do not follow links outside this domain. | |
--no-parent \ # Don't follow links outside the directory you pass in. | |
https://bryan-guner.gitbook.io/python/ | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://soybean-tulip-em56.squarespace.com/config/pages | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://cheatography.com/davechild/cheat-sheets/regular-expressions/ | |
https://ankiweb.net/decks/ | |
----------------------------------------------------------------------------------------------------------- | |
cat * > ./merged-file.html | |
find . -type f -exec 'pandoc -s *.docx -t markdown -o example35.md' {} \; | |
pandoc -s *.docx -t markdown -o example35.md | |
pandoc -s *.docx > output.md | |
pandoc -s *.py > output.md | |
Copy file structure without the files: | |
rsync -a -f"+ */" -f"- *" './'/ './structure/'/ | |
rsync -a -f"+ */" -f"- *" ./ ./../folder/ | |
rsync -a -f"+ */" -f"- *" source/ destination/ | |
----------------------------------------------------------------------------------------------------------- | |
Remove Script tags and their content: | |
find ./ -iname "*.html" -type f -exec sh -c 'sed "/<script/,/<\/script>/d" *.html' {} \; >testOut.html | |
----------------------------------------------------------------------------------------------------------- | |
cat *.html > node-mod-readme.html | |
----------------------------------------------------------------------------------------------------------- | |
Powershell remove numbers and dashes from file names: | |
Dir | Rename-Item –NewName { $_.name –replace " ","_" } | |
Dir | Rename-Item –NewName { $_.name –replace "1","" } | |
Dir | Rename-Item –NewName { $_.name –replace "2","" } | |
Dir | Rename-Item –NewName { $_.name –replace "3","" } | |
Dir | Rename-Item –NewName { $_.name –replace "4","" } | |
Dir | Rename-Item –NewName { $_.name –replace "5","" } | |
Dir | Rename-Item –NewName { $_.name –replace "6","" } | |
Dir | Rename-Item –NewName { $_.name –replace "7","" } | |
Dir | Rename-Item –NewName { $_.name –replace "8","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "-","" } | |
Dir | Rename-Item –NewName { $_.name –replace "0","" } | |
----------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/sol\~/d' ./right.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
sudo sed -i '/\.svg/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.jpg/d' ./index.html | |
sudo sed -i '/\.scss/d' ./index.html | |
sudo sed -i '/scss/d' ./index.html | |
sudo sed -i '/\.txt/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.pdf/d' ./index.html | |
sudo sed -i '/\.mp4/d' ./index.html | |
sudo sed -i '/\.pug/d' ./index.html | |
sudo sed -i '/\.DS_store/d' ./index.html | |
sudo sed -i '/\.DS_Store/d' ./index.html | |
sudo sed -i '/\.sql/d' ./index.html | |
sudo sed -i '/\.py/d' ./index.html | |
sudo sed -i '/\.xlsx/d' ./index.html | |
sudo sed -i '/\.JPG/d' ./index.html | |
sudo sed -i '/\.TTF/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.eot/d' ./index.html | |
sudo sed -i '/\.ttc/d' ./index.html | |
sudo sed -i '/\.PNG/d' ./index.html | |
sudo sed -i '/\.java/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.go/d' ./index.html | |
sudo sed -i '/\.vue/d' ./index.html | |
--------------------------Create Html Directory--------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="sitemap.html" | |
out="basename $out.html" | |
html="sitemap.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
----------------------------------------Recurse Dirs----------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
----------------------------------------------------------------------------------------------------------- | |
<pre><code> | |
#!/bin/bash | |
link="#insert url here#" | |
#links were a set of strings with just the index of the video as the variable | |
num=3 | |
#first video was numbered 3 - weird. | |
ext=".mp4" | |
while [ $num -le 66 ] | |
do | |
wget $link$num$ext -P ~/Downloads/ | |
num=$(($num+1)) | |
done | |
</code></pre> | |
----------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/{#3585 \.graf \.graf--mixtapeEmbed \.graf-after--p /d' ./*.md | |
print a dummy text file in each folder | |
for x in "./"/*/; do | |
(cd "$x" | |
files=(*) | |
printf '%s\n' "${files[@]}" > deleteme.txt | |
) | |
done | |
----------------------------------------------------------------------------------------------------------- | |
download all links of given file type | |
wget -r -A.pdf https://overapi.com/git | |
wget -r -A.pdf https://www.analog.com/en/education/education-library/scientist_engineers_guide.html#Foundations | |
wget -r -A.pdf https://norwex.biz/en_US/?gclid=EAIaIQobChMIgOLa0ILN8gIVmozICh2IyQpbEAAYASAAEgIIdvD_BwE | |
wget -r -A.html https://bgoonz-blog-v3-0.netlify.app/ | |
----------------------------------------------------------------------------------------------------------- | |
for file in *. | |
do | |
sudo sed -i '/Copyright/d' ./*.html | |
done | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Remove any lines not contaning string text or blah | |
sudo sed -i '/chrome-extension/d' bookmarks_12_28_21.md | |
sudo sed -i '/raw_url/!d' gist.md | |
sudo sed -i '/\.html/!d' files.md | |
sudo sed -i '/\.html/!d' index.html | |
sudo sed -i '/description:/d' object2.js | |
sudo sed -i '/loc/!d' scrap1.md | |
sudo sed -i '/loc/!d'sitemap.xml | |
sudo sed -i '/\.js/!d' ./SCRAP.html | |
sudo sed -i '/CODE-MIRROR/d' ./resources.html | |
sudo sed -i '/!\[\](/d' ./lecture-notes.md | |
sudo sed -i '/\.html/d' ./index.html | |
sudo sed -i '/Exported from/d' ./*.html | |
sudo sed -i '/src="data:image/d' ./everyonescodepens.html | |
--------------------------------------------------------------------------------------------------------- | |
# Reinstall all npm packages | |
npm i npm-reinstall | |
reinstall | |
--------------------------------------------------------------------------------------------------------- | |
style="width: 300px;position: relative;display: flex;margin:auto;" | |
--------------------------------Recursivly pull and accept incomming merge changes------------------------------------------------------------------------- | |
<body> | |
<a href="https://github.com/bgoonz" class="github-corner" | |
aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" | |
style="z-index: 100000; fill:#194ccdaf; color:#fff; position: fixed; top: 20px; border: 0; left: 20px; transform: scale(-1.5, 1.5);" | |
aria-hidden="true"> | |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | |
<path | |
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" | |
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"> | |
</path> | |
<path | |
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" | |
fill="currentColor" class="octo-body"></path> | |
</svg></a> | |
1865 | |
git pull -s recursive -X ours https://github.com/Web-Dev-Collaborative/archive-backup.git | |
git pull -s recursive -X ours https://github.com/bgoonz/Lambda.git | |
git pull -s recursive -X theirs url | |
git pull -s recursive -X theirs https://github.com/bgoonz/Lambda.git | |
--------------------------------------------------------------------------------------------------------- | |
Overwrite local repo: | |
git fetch origin | |
git reset --hard origin/master | |
git fetch origin | |
git reset --hard origin/main | |
--------------------------------------------------------------------------------------------------------- | |
Add text to the first line of every file of a certain extension in a given folder. | |
for f in *.js; do printf '%s\n' 0a '//------------------------------------------------------------------------------------------------' . x | ex "$f"; done | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------------------------How to add to end of file:------------------------------------------------------ | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Input Output error | |
wsl.exe --shutdown then Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
Replace the string source with target in all files in the current directory and all sub-directories: | |
find . -type f -exec rename 's/source/target/' {} \; | |
Replace the string source with target in all directories in the current directory and all sub-directories: | |
find . -type d -exec rename 's/source/target/' {} \; | |
find . -type f -exec rename 's/\_/-/' {} \; | |
find . -type f -exec rename 's/\_gif//' {} \; | |
find . -type f -exec rename 's/\_jpg//' {} \; | |
find . -type f -exec rename 's/\.svg//' {} \; | |
find . -type f -exec rename 's/\~/\-/' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
I use this one-liner to remove invalid characters in subtitle files: | |
for f in *.srt; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
Only process *.srt files( * could be used in place of *.srt to process every file) | |
Removes all other characters except for letters A-Za-z, numbers 0-9, periods ".", and dash's "-" | |
Removes possible double or triple periods | |
Checks to see if the file name needs changing | |
If true, it renames the file with the mv command, then outputs the changes it made with the echo command | |
It works to normalize directory names of movies: | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.]/./g' -e 's/\.\.\././g' -e 's/\.\././g' -e 's/\.*$//'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
--------------------------------------------------------------------------------------------------------- | |
To remove any number of trailing spaces from file names you can use rename (prename) : | |
rename 's/ *$//' * | |
find ./ -type f -exec rename 's/ *$//' *' {} \; | |
find ./ -type d -exec rename 's/ *$//' * {} \; | |
--------------------------------------------------------------------------------------------------------- | |
-----------------------------Get tripple backtick code blocks---------------------------------------------------------------------------------- | |
sed -n '/^```/,/^```/ p' < input.file | |
--------------------------------------------------------------------------------------------------------------- | |
Recursivley remove files by name: | |
find . -name hts-log.txt -type f -exec rm -rf {} \; | |
find . -name cookies.txt -type f -exec rm -rf {} \; | |
find . -name fade.gif -type f -execcp rm -rf {} \; | |
find . -name right.html -type f -exec cp rm -rf {} \; | |
Recursivley remove folders by name. | |
find . -type f -exec sed -i '/Mirrored from/d' ./* {} \; | |
find . -type f -exec sed -i '/Exported from /d' ./* {} \; | |
find . -type f -exec sed -i '/define/d' ./* {} \; | |
--------------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
set -e | |
if [ $# -eq 0 ]; then | |
dir="." | |
else | |
dir="$1" | |
fi | |
if [ ! -d "$dir" ]; then | |
echo "not a dir: $dir" | |
exit 1 | |
fi | |
if [ ! -d "$dir/.git" ]; then | |
echo "not a git repo: $dir" | |
exit 1 | |
fi | |
cd "$dir" | |
files=$(find .git/refs -type f) | |
for f in $files; do | |
id=$(cat "$f") | |
if ! git rev-parse --quiet "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing ref $f with missing commit $id" | |
rm "$f" | |
fi | |
done | |
if [ ! -f .git/packed-refs ]; then | |
exit 0 | |
fi | |
packfiles=$(cat .git/packed-refs \ | |
| grep -v '#' \ | |
| awk '{print $2}') | |
for f in $packfiles; do | |
if ! git rev-parse --quiet --verify "$f" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
id=$(git rev-parse "$f") | |
if ! git rev-parse --quiet --verify "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing packed ref $f with missing commit $id" | |
git update-ref -d $f | |
fi | |
done | |
find . -name "* *" -type f | rename 's/.png.html.png/.png/g' | |
----------------------Index of Iframes---------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<iframe src=\""$1"\">","</iframe>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
-------------------------------------------------------- | |
convert .ipynb to html | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for f in *.md; do cat "${f}"; echo; done > Combined_____-_____Doc.md | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
Best Developer Tools Resources and Tools for Entrepreneurs | |
OpenGraph is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no additional cost to you. | |
Featured | |
Branding & Logo | |
Content Idea Generators | |
Writing | |
Design Tools | |
Developer Tools | |
Social Image Generators | |
Stock Photos | |
Stock Videos | |
Illustrations | |
Mockups | |
Image Optimizers | |
Analytics | |
Get A Free PDF Version of This List: Contains 90+ resources found here | |
[email protected] | |
Send me the PDF | |
Toast.log | |
Toast.log | |
See errors, warnings, and logs as they happen on your site — without having to open the browser’s console. | |
CSS Scan | |
CSS Scan | |
Goodbye to "Inspect Element" — Visualize the CSS of any element you hover over, instantly, and copy its entire rules with a single click. | |
CSS Scan Pro | |
CSS Scan Pro | |
CSS Scan Pro makes it radically easy to get the looks of your favorite websites. Hover over any element, and get everything you need (styles, animations, assets, etc...), instantly. Copy elements with a single click, or edit them with our intuitive CSS editor, without writing code. | |
#!/bin/bash | |
files=(*.js) | |
folder=1 | |
count=0 | |
if [ ! -d "folder$folder" ]; then | |
mkdir "folder$folder" | |
fi | |
for i in "${files[@]}" | |
do | |
mv "$i" "folder$folder" | |
let count=$count+1 | |
if [ "$count" == "20000" ]; then | |
let count=0 | |
let folder=$folder+1 | |
if [ ! -d "folder$folder" ]; then | |
mkdir "folder$folder" | |
fi | |
fi | |
done | |
for i in `seq -f '%03g' 1 200`; do | |
FOLDER=patient0$i | |
mkdir -p Leet/$FOLDER # creates folder if missing | |
find . -regex ".*${i}$" -type f -exec mv -i {} leet/$FOLDER/ \; # | |
done | |
The base URL is https://cdn.jsdelivr.net/gh/{username}/{repo}/, where you replace {username} with the GitHub username and {repo} with the repository name for the project. Append that URL with the path to the file you want to access in the project. | |
The base URL is https://cdn.jsdelivr.net/gh/{username}/{repo}/, where you replace {username} with the GitHub username and {repo} with the repository name for the project. | |
Append that URL with the path to the file you want to access in the project. For example, for this repo: the style file is located in the root directory. You'd use this. | |
html ` | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/gitbook-style-full.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/code-highlight.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/table-of-contents.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/Theme%20(1).css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/Theme%20(2).css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/Theme%20(3).css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/Theme%20(4).css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/Theme%20(5).css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/gitbook-style-full.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/basic-docs.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/blog-modern.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/boilerplate.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/codepen-embed.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/darcula.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/dark.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/darkula.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/default.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/dirhtml-left.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/dracula.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/font-awesome.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/github-gist.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/github-mm.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/github.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/googlecode.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/gradient-dark.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/gradient.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/grayscale.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/jquery-ui.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/jquery-ui.structure.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/jquery-ui.theme.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/kavadocs.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/left.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/markdown-to-html-style.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/mdn-article.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/medium-basic-export.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/mono-blue.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/monokai-sublime.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/monokai.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/notion.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/obsidian.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/gitbook-style-full.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/prism.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/right.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/style.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/twilight.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/vs.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/vs2015.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/xcode.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/zenburn.css"> | |
<script async defer src="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/autosize.min.js"></script> | |
<script async defer src="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/copy-2-clip.js"></script> | |
<script async defer src="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/git.js"></script> | |
C:/WINDOWS/System32/wsl.exe | |
C:\Users\bryan\AppData\Local\Microsoft\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\ubuntu.exe | |
-----------------------------------------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 | |
--------------------------------------------------------------------------------------------------------- | |
Install node modules recursevly ( npm i -g recursive-install ): | |
npm-recursive-install | |
---------------------------------------------------Main Commands--------------------------------------------------------------------------- | |
find . -empty -type d -print -delete OR 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 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name 'right.html' -type f -prune -exec rm -rf '{}' + | |
find . -name 'left.html' -type f -prune -exec rm -rf '{}' + | |
----------------------------------------------Remove Spaces In File/Folder Names----------------------------------------------------------- | |
find . -name "* *" -type d | rename 's/ /_/g' | |
find . -name "* *" -type f | rename 's/ /_/g' | |
------------------------------------Truncate folder names down to 12 char------------------------------------------------------------------------ | |
for d in *; do mv $d ${d:0:12}; done | |
-------------------------------------Remove Numbers From File Names------------------------------------------------------------------------ | |
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 | |
-------------------------------------FIND AND REPLACE IN STRING/FOLDER NAMES---------------------------------------------------------------- | |
find . -type f -exec rename 's/string1/string2/g' {} + | |
find . -type d -exec rename 's/-master//g' {} + | |
rename 's/\.js\.download$/.js/' *.js\.download | |
find . -type d -exec rename 's/es6//g' {} + | |
------------------------------------------- | |
Remove double extensions : | |
#!/bin/bash | |
for file in *.html.html | |
do | |
mv "${file}" "${file%.html}" | |
done | |
#!/bin/bash | |
for file in *.md.md | |
do | |
mv "${file}" "${file%.md}" | |
done | |
find . -type f -exec rename's/\.js\.download$/.js/' *.js\.download ' {} + | |
<iframe width="560" height="315" | |
src="https://www.youtube-nocookie.com/embed/xGZSWvFess8?start=2" | |
title="YouTube video player" frameborder="0" allow="accelerometer; | |
autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | |
allowfullscreen></iframe> | |
<iframe width="560" height="315" | |
src=" | |
<iframe width="560" height="315" | |
src="https://www.youtube-nocookie.com/embed/xGZSWvFess8?start=2" | |
title="YouTube video player" frameborder="0" allow="accelerometer; | |
autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | |
allowfullscreen></iframe>" | |
title="search" frameborder="0" allow="accelerometer; | |
autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | |
allowfullscreen></iframe> | |
--------------------------------------------------------------------------------------------------------- | |
clone all of a user's git repositories | |
CNTX={users}; NAME={xriley}; 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={bgoonz}; 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={hasura}; 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 | |
Clone Orginization: | |
#!/bin/bash | |
for i in $(curl "https://api.github.com/orgs/hasura/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/mdn/repos" | grep -oP '"clone_url":\s*"\K[^"]+'); do | |
echo git clone "$i" | |
done | |
#!/bin/bash | |
for i in $(curl "https://api.github.com/orgs/chartjs/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 -I _L 4 'node_modules' >TREE2.md | |
tree -f >README.md | |
full path: | |
tree -f ~/ | |
--------------------------------------------------------------------------------------------------------- | |
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} + | |
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} + | |
--------------------------------------------------------------------------------------------------------- | |
sudo npm i prettier -g | |
prettier --write . | |
"pretty": "prettier --write \"./**/*.{js,jsx,py,md,html,css}\"" | |
--------------------------------------------------------------------------------------------------------- | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
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"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
Remove lines contaning string: | |
sudo sed -i '/githubusercontent/d' ./*sandbox.md | |
sudo sed -i '/github\.com/d' ./*out.md | |
--------------------------------------------------------------------------------------------------------- | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous"> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script> | |
https://bgoonz-blog.netlify.app/ | |
<iframe id="inlineFrameExample" | |
title="Inline Frame Example" | |
frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true" | |
width="800" | |
height="800" | |
src="https://deploy-preview-5--jolly-austin-0c1a1d.netlify.app/organizer"> | |
</iframe> | |
// schemas/documents/post.js | |
export default { | |
type: "document", | |
title: "Blog post", | |
name: "post", | |
fields: [ | |
{ | |
type: "string", | |
name: "title" | |
}, | |
{ | |
title: "Body", | |
name: "body", | |
type: "array", | |
of: [{ type: "block" }] | |
} | |
] | |
}; | |
--------------------------------------------------------------------------------------------------------- | |
https://repl.it/@bgoonz/PyScript-Docs?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/stargazers/d' ./repo.txt | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/right\.html/d' ./right.html | |
--------------------------------------------------------------------------------------------------------- | |
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" | |
# usage: | |
# - zipdir thedir | |
# - zip thedir -x "**anotherexcludedsubdir/*" (important the double quotes to prevent glob expansion) | |
# if in windows/git-bash, add 'zip' command this way: | |
# https://stackoverflow.com/a/55749636/1482990 | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
--------------------------------------------------------------------------------------------------------- | |
https://github.com/stackbit-projects/best-celery-b2d7c/commit/b423b88323a79d11e5979f92b0a185025b3ca86a | |
------------------------------------------------GIT--------------------------------------------------------- | |
------------------------------------------------GIT--------------------------------------------------------- | |
------------------------------------------------GIT--------------------------------------------------------- | |
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 preview | |
--------------------------------------------------------------------------------------------------------- | |
git pull keeping local changes: | |
git stash | |
git pull | |
git stash pop | |
--------------------------------------------------------------------------------------------------------- | |
Remove Submodules: | |
git submodule deinit | |
----------------------------------------- | |
# download up to 8 submodules at once | |
git submodule update --init --recursive --jobs 8 | |
git clone --recursive --jobs 8 [URL to Git repo] | |
-------------------------------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/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 '<MESSAGE>' ; 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: | |
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe", | |
--------------------------------------------------------------------------------------------------------- | |
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----------------------------------------------------------------- | |
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 | |
npm i @bgoonz11/repoutils | |
------------------------------------------- | |
---------------------------------------Trouble Shooting------------------------------------------------------------------ | |
input/Output error | |
wsl.exe --shutdown | |
Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
ln -s "$(pwd)" ~/Downloads | |
-------------------------------------------- | |
return to bash from zsh | |
sudo apt --purge remove zsh | |
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 | |
mdt-docs | |
--------------------------------------------------------------------------------------------------------- | |
---------------------------------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 <mydir> -type f -exec sed -i 's/<string1>/<string2>/g' {} + | |
find . -type f -exec rename 's/-master//g' {} + | |
find . -type f -exec rename 's/-main//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 | |
---------------------------------------------------------------------------------------------------------- | |
---------------------------------------------------------------------------------------------------------- | |
find . -name "*right.md" -type f -print -delete | |
find . -name "*right.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 | |
find . -name "*.tgz" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
--------------------------------------------------------------------------------------------------------- | |
PRISM: | |
<script async defer src="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/misc/web-dev-utils/personal-utilities/prism/prism.js"></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bgoonz/GIT-CDN-FILES/prism.css"> | |
--------------------------------------------------------------------------------------------------------- | |
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 | |
} | |
} | |
} | |
--------------------------------------------------------------------------------------------------------- | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/xGZSWvFess8?start=2" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="./prism.css"> | |
<script async defer src="./prism.js"></script> | |
</head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------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 *.md -print0 | xargs -0 -I file cat file > merged.file.md | |
pandoc *.md > final.md | |
find . -name *.html -exec cat {} + > merged.file.html | |
find . -name *.md -exec cat {} + > merged.file.md | |
--------------------------------------------------------------------------------------------------------- | |
Flatten all sub folders into one folder contaning files. | |
find ./ -mindepth 1 -type f -exec mv -t ./ --backup=t '{}' + | |
------------------------ | |
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} \; | |
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 '/Mirrored from/d' ./*.html {} \; | |
find . -type f -exec sed -i '/ Created by <span class=\x27author\x27>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<p>Document generated by Confluence on/d' ./*.html {} \; | |
find . -type f -exec sed -i '/<div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html {} \; | |
find . -type f -exec sed -i '/miguelgrinberg/d' ./*.html {} \; | |
find . -type f -exec sed -i '/Mirrored from/d' ./*.html {} \; | |
find . -type f -exec sed -i '/class="column-list"/d' ./index.html {} \; | |
find . -type f -exec sed -i '/Added by HTTrack/d' ./*.html {} \; | |
--------------------------------------------------------------------------------------------------------- | |
rename -n 's/(.*).{1}/$1/' * | |
rename -n 's/.{1}$//' * | |
rename -n 's/(.*).{1}/$1/' * | |
find . -maxdepth 1 -type d -name '?????????????*' -exec rename -n 's/.{1}$//' {} + | |
for i in *.; do | |
mv "$i" "${i:0:-1}" | |
done | |
git add . | |
git commit -m "update" | |
git push -u origin master | |
--------------------------------------------------------------------------------------------------------- | |
firstname-lastname-day2 | |
git remote remove origin | |
--------------------------------------------------------------------------------------------------------- | |
Download website with wget: | |
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off | |
--------------------------------------------------------------------------------------------------------- | |
find . -name "*.xml" -type f -print | |
s | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
youtube-dl https://www.youtube.com/user/Mihirishere/videos | |
youtube-dl https://www.youtube.com/user/norwex/videos | |
--------------------------------------------------------------------------------------------------------- | |
Remove duplicate lines from a text file | |
You can use this shell command: | |
COPY | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
httrack --ext-depth=2 | |
httrack --ext-depth=2 https://kathyguner.norwex.biz/ | |
httrack https://kathyguner.norwex.biz/ | |
httrack --ext-depth=3 https://www.textfixer.com/html/convert-url-to-html-link.php | |
httrack http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html -O "./temp" %e5 | |
httrack --ext-depth=4 http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html | |
httrack --ext-depth=4 https://www.vickielasher.com/ | |
--------------------------------------------------------------------------------------------------------- | |
grab all links from website | |
lynx -dump https://distrokid.com/hyperfollow/mihirbeg/getting-there | awk '/http/{print $2}' > links2.txt | |
lynx -dump https://geeksforgeeks.org/top-10-useful-github-repos-that-every-developer-should-follow | awk '/http/{print $2}' > links.md | |
lynx -dump https://html.com/blog/100-web-development-cheat-sheets | awk '/http/{print $2}' > links.md | |
wget -qO- www.instagram.com/mihirbeg/ | | |
grep -Eoi '<a [^>]+>' | | |
grep -Eo 'href="[^\"]+"' | | |
grep -Eo '(http|https)://[^/"]+'>output.md | |
--------------------------------------------------------------------------------------------------------- | |
GitFlow_-_step_by_step_a5dcb946b01f4d66be259ba33733763b | |
.*(?<=<script)(.*)(?=<\/script>).* | |
.*\./\.git.* | |
.*node_modules.* | |
find . -name "*.zip" -type f -print | |
find . -name "*.zip" -type f -print -delete | |
find . -name "*.gitignore" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
REMOVE DUPLICATE LINES: | |
uniq -u input.txt output.txt | |
uniq -u resources.html output.html | |
uniq -u testOut.html TESTOUT.html | |
--------------------------------------------------------------------------------------------------------- | |
2.)find and delete all empty directories()===> | |
find . -empty -type d -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
3.)Find and delete all empty files()===> | |
find . -empty -type f -print -delete | |
add extension to every file in folder | |
find . -type f -exec mv '{}' '{}'.py \; | |
find . -type f -exec mv '{}' '{}'.png \; | |
find . -type f -exec mv '{}' '{}'.html \; | |
find . -type f -exec mv '{}' '{}'.md \; | |
for f in * ; do | |
mv "$f" "$f.md" | |
done | |
for f in * ; do | |
mv "$f" "$f.html" | |
done | |
for f in * ; do | |
mv "$f" "$f.css" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
delete lines contaning specific string: | |
sed -i '/normalizerEmpty/d' ./js-in-one-page.html | |
sed -i '/\.git/d' ./index.html | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" \) -a -exec sed -i '/BADSTRING/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*scrap3.md" \) -a -exec sed -i '/stargazers/d' '{}' + | |
sed -i '//d' ./*.html | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" -o -name "*.php" \) -a -exec sed -i '/MIT/d' '{}' + | |
find . -type f -a \( -name "*.html" -o -name "*.md" \) -a -exec sed -i '/[Source]/d' '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
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 '/\.git/d' ./index.html | |
sudo sed -i '/assets/d' ./index.html | |
sudo sed -i '/stargazers/d' ./scrap3.md | |
--------------------------------------------------------------------------------------------------------- | |
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' | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
find . -name "*" -type f | xargs sed -i -e '/Mirrored from/d' | |
--------------------------------------------------------------------------------------------------------- | |
print out the path of every file recursivley | |
ls -R './' | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }'>listing.md | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
sed -n -e '/<script>/,/<\/script>/p' getting-there.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<script>/,/<\/script>/p' *.html >out.js ./* {} \; | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
sed -n -e '/<script>/,/<\/script>/p' *.html >out.js | |
find . -type f -exec sed -n -e '/<code class="sourceCode javascript">/,/<\/code>/p' *.html >out.html ./* {} \; | |
find . -type f -exec sed -n -e '/```js/,/```/p' *.html >out.js ./* {} \; | |
sed -i 's/<script>//g' out.js | |
sed -i 's/<\/script>//g' out.js | |
.*\./<script* | |
(?<=<script)(.*)(?=<\/script>) | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/ <div id="footer-logo"><a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a><\/div>/d' ./*.html | |
sudo sed -i '/ <a href="http:\/\/www\.atlassian\.com\/">Atlassian<\/a>/d' ./*.html | |
sudo sed -i '/ Document generated by Confluence on/d' ./*.html | |
--------------------------------------------------------------------------------------------------------- | |
Resursivley delete node modules | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name 'description\.txt' -type d -prune -exec rm -rf '{}' + | |
/workspace/my-gists/TESTING/description.txt | |
find . -name '\.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
5.) Remember Git Credentials: | |
git config --global credential.helper store | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CONTRIBUTING.md" \) -exec rm -rf -- {} + | |
find . \( -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.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 -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_website-components/0-DOJO/widgets-master/output/info/stats.json' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_00-4-all-time/_0-Random-Repo/zipped.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_f95b7cbda3503d5d3f539e0c8401209c6f7c0c91f6ae2fa510a6efcaeaf697ef' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_7-assets/Past-Cohort/LambdaSchool-master.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_PDFS/Head_First_Csharp.pdf' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch git filter-branch --index-filter 'git rm -r | |
--cached --ignore-unmatch assets/_index.html' HEAD' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
nano | |
When you're done, hit CTRL+O to save and CTRL+X to exit Nano. You'll just need to restart the SSH server with one of the following commands. | |
$ systemctl restart sshd | |
$ service sshd restart | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley Create numbered folders: | |
n=1; | |
max=50; | |
while [ "$n" -le "$max" ]; do | |
mkdir "s$n" | |
n=`expr "$n" + 1`; | |
done | |
--------------------------------------------------------------------------------------------------------- | |
Command Line: Rename all files in current directory to a certain file extension: | |
forfiles /S /M * /C "cmd /c rename @file @fname.js" | |
forfiles /S /M * /C "cmd /c rename @file @fname.html" | |
forfiles /S /M * /C "cmd /c rename @file @fname.java" | |
--------------------------------------------------------------------------------------------------------- | |
The following command would rename all *.txt files to *.doc. | |
$ rename 's/\.txt$/.doc/' *.txt | |
rename 's/\.txt$/.js/' *.txt | |
$ rename 's/\.example$/.sql/' *.example | |
rename 's/\.js\.download$/.js/' *.js\.download | |
find . -name "*.htm" -exec rename 's/\.htm$/.html/' '{}' + | |
find . -name "*.\.js\.download" -exec rename 's/\.js\.download$/.js/' '{}' + | |
echo "</body></html>" | tee -a *.html | |
rename 's/\.html\.tmp$/.html/' *.html\.tmp | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \; | |
------------------------------------From html >md below--------------------------------------------------------------------- | |
pandoc --wrap=none --from html --to markdown_strict | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc "${0}" -o "${0%.html}.md"' {} \; | |
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley list every single file in the working directory... 1 per line: | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
write-to-txt-file | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
--------for only html-files------------------------------------------------------------------------------ | |
find ./ | grep -i "\.html*$" | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
forfiles /S /M *.File /C "cmd /c rename @file @fname.js" | |
--------------------------------------------------------------------------------------------------------- | |
Recreate folder structure with only specific file types | |
find . -type f -name '*.md' | cpio -p -d -v './../markdown-folder' | |
find . -type f -name '*.md' | cpio -p -d -v './..' | |
find . -type f -name '*.png' | cpio -p -d -v './_ext' | |
find . -name '*.README.md' | cpio -pdm './extension-readme' | |
find . -name '*.md' | cpio -pdm './../Markdown' | |
find . -name '*.git' | cpio -pdm './GIT-FOLDERS' | |
--------------------------------------------------------------------------------------------------------- | |
7.) ()===> | |
--------------------------------------------------------------------------------------------------------- | |
8.) Command Prompt: code --list-extensions | |
for /F "tokens=*" %A in (extensions.list) do code --install-extension %A | |
--------------------------------------------------------------------------------------------------------- | |
9.)Create a soft link in the home dir | |
ln -s /mnt/c/0-a-A-October | |
--------------------------------------------------------------------------------------------------------- | |
10.) | |
sudo apt update | |
sudo apt upgrade | |
git config --global user.name bryan | |
git config --global user.email [email protected] | |
sudo apt update | |
sudo apt install build-essential | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
. ./.bashrc | |
nvm install --lts | |
sudo apt install unzip | |
npm install -g mocha | |
npm audit fix -F | |
npm audit fix -f | |
npm install -g mocha | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install python3 | |
----------------------------------------------------------------------------------------------------------- | |
Command Line vscode | |
code --list-extensions | |
code --disable-extension <ext-name> | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
dockerd | |
----------------------------------------------------------------------------------------------------------- | |
killall node | |
----------------------------------------------------------------------------------------------------------- | |
sudo service postgresql stop | |
sudo service postgresql start | |
sudo service postgresql restart | |
---------------------------------------- | |
sed -e '/.git/ { | |
$!N | |
d | |
}'index.html | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. | |
--restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
--domains yoursite.com \ # Do not follow links outside this domain. | |
--no-parent \ # Don't follow links outside the directory you pass in. | |
https://www.instagram.com/mihirbeg/?hl=en | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://soybean-tulip-em56.squarespace.com/config/pages | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
https://cheatography.com/davechild/cheat-sheets/regular-expressions/ | |
https://ankiweb.net/decks/ | |
----------------------------------------------------------------------------------------------------------- | |
cat * > ./merged-file.html | |
find . -type f -exec 'pandoc -s *.docx -t markdown -o example35.md' {} \; | |
pandoc -s *.docx -t markdown -o example35.md | |
pandoc -s *.docx > output.md | |
Copy file structure without the files: | |
rsync -a -f"+ */" -f"- *" './'/ './../'/ | |
rsync -a -f"+ */" -f"- *" source/ destination/ | |
----------------------------------------------------------------------------------------------------------- | |
Remove Script tags and their content: | |
find ./ -iname "*.html" -type f -exec sh -c 'sed "/<script/,/<\/script>/d" *.html' {} \; >testOut.html | |
----------------------------------------------------------------------------------------------------------- | |
cat *.html > node-mod-readme.html | |
----------------------------------------------------------------------------------------------------------- | |
Powershell remove numbers and dashes from file names: | |
Dir | Rename-Item –NewName { $_.name –replace " ","_" } | |
Dir | Rename-Item –NewName { $_.name –replace "1","" } | |
Dir | Rename-Item –NewName { $_.name –replace "2","" } | |
Dir | Rename-Item –NewName { $_.name –replace "3","" } | |
Dir | Rename-Item –NewName { $_.name –replace "4","" } | |
Dir | Rename-Item –NewName { $_.name –replace "5","" } | |
Dir | Rename-Item –NewName { $_.name –replace "6","" } | |
Dir | Rename-Item –NewName { $_.name –replace "7","" } | |
Dir | Rename-Item –NewName { $_.name –replace "8","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "9","" } | |
Dir | Rename-Item –NewName { $_.name –replace "-","" } | |
Dir | Rename-Item –NewName { $_.name –replace "0","" } | |
----------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
sudo sed -i '/:::/d' ./*.mc | |
sudo sed -i '/Blog at WordPress/d' ./index.html | |
find . -type f -exec sed -i '/Blog at WordPress/d' ./* {} \; | |
sudo sed -i '/right\.html/d' ./index.html | |
find . -type f -exec sed -i '/walkthrough/d' ./* {} \; | |
sudo sed -i '/walkthrough/d' ./*.html | |
sudo sed -i '/index\.html/!d' ./index.html | |
sudo sed -i '/\.git/d' ./index.html | |
sudo sed -i '/node_modules/d' ./index.html | |
sudo sed -i '/right\.html/d' ./index.html | |
sudo sed -i '/sol\~/d' ./right.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
sudo sed -i '/\.svg/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.jpg/d' ./index.html | |
sudo sed -i '/\.scss/d' ./index.html | |
sudo sed -i '/scss/d' ./index.html | |
sudo sed -i '/\.txt/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.pdf/d' ./index.html | |
sudo sed -i '/\.mp4/d' ./index.html | |
sudo sed -i '/\.pug/d' ./index.html | |
sudo sed -i '/\.DS_store/d' ./index.html | |
sudo sed -i '/\.DS_Store/d' ./index.html | |
sudo sed -i '/\.sql/d' ./index.html | |
sudo sed -i '/\.py/d' ./index.html | |
sudo sed -i '/\.xlsx/d' ./index.html | |
sudo sed -i '/\.JPG/d' ./index.html | |
sudo sed -i '/\.TTF/d' ./index.html | |
sudo sed -i '/\.ttf/d' ./index.html | |
sudo sed -i '/\.eot/d' ./index.html | |
sudo sed -i '/\.ttc/d' ./index.html | |
sudo sed -i '/\.PNG/d' ./index.html | |
sudo sed -i '/\.java/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.jpeg/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.go/d' ./index.html | |
sudo sed -i '/\.vue/d' ./index.html | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="sitemap.html" | |
out="basename $out.html" | |
html="sitemap.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <title> directory </title>" | |
echo "" | |
echo '<style>' | |
echo ' a {' | |
echo ' color: black;' | |
echo ' }' | |
echo '' | |
echo ' li {' | |
echo ' border: 1px solid black !important;' | |
echo ' font-size: 20px;' | |
echo ' letter-spacing: 0px;' | |
echo ' font-weight: 700;' | |
echo ' line-height: 16px;' | |
echo ' text-decoration: none !important;' | |
echo ' text-transform: uppercase;' | |
echo ' background: #194ccdaf !important;' | |
echo ' color: black !important;' | |
echo ' border: none;' | |
echo ' cursor: pointer;' | |
echo ' justify-content: center;' | |
echo ' padding: 30px 60px;' | |
echo ' height: 48px;' | |
echo ' text-align: center;' | |
echo ' white-space: normal;' | |
echo ' border-radius: 10px;' | |
echo ' min-width: 45em;' | |
echo ' padding: 1.2em 1em 0;' | |
echo ' box-shadow: 0 0 5px;' | |
echo ' margin: 1em;' | |
echo ' display: grid;' | |
echo ' -webkit-border-radius: 10px;' | |
echo ' -moz-border-radius: 10px;' | |
echo ' -ms-border-radius: 10px;' | |
echo ' -o-border-radius: 10px;' | |
echo ' }' | |
echo ' </style>' | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
# continue with the HTML stuff | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </a></li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
pip3 install -r requirements.txt | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
sudo sed -i '/Blog at WordPress/d' ./*.html | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
---------------------------------------------------------------------------------------------------------- | |
mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g') | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
find . -type f -exec sed -n -e '/```javascript/,/```/p' *.html >out.js ./* {} \; | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
--------------------------------------------Sanatize-------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g') | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
---------------------------------------------------------------------------------------------------------- | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
#!/bin/bash | |
( | |
IFS=$'\n' | |
for y in $(ls $1) | |
do | |
mv $1/`echo $y | sed 's/ /\\ /g'` $1/`echo "$y" | sed 's/ /_/g'` | |
done | |
) | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
#!/bin/bash | |
( | |
IFS=$'\n' | |
for y in $(ls $1) | |
do | |
mv $1/`echo $y | sed 's/ /\\ /g'` $1/`echo "$y" | sed 's/ /_/g'` | |
done | |
) | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for file in *; do mv "$file" `echo $file | tr '_' '.'` ; done | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
function RecurseDirs () | |
{ | |
oldIFS=$IFS | |
IFS=$'\n' | |
for f in "$@" | |
do | |
# YOUR CODE HERE! | |
for file in *; do mv "$file" `echo $file | tr '_' '.'` ; done | |
if [[ -d "${f}" ]]; then | |
cd "${f}" | |
RecurseDirs $(ls -1 ".") | |
cd .. | |
fi | |
done | |
IFS=$oldIFS | |
} | |
RecurseDirs "./" | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
---------------------------------------------------------------------------------------------------------- | |
----------------------------------------------------------------------------------------------------------- | |
<pre><code> | |
#!/bin/bash | |
link="#insert url here#" | |
#links were a set of strings with just the index of the video as the variable | |
num=3 | |
#first video was numbered 3 - weird. | |
ext=".mp4" | |
while [ $num -le 66 ] | |
do | |
wget $link$num$ext -P ~/Downloads/ | |
num=$(($num+1)) | |
done | |
</code></pre> | |
----------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/{#3585 \.graf \.graf--mixtapeEmbed \.graf-after--p /d' ./*.md | |
print a dummy text file in each folder | |
for x in "./"/*/; do | |
(cd "$x" | |
files=(*) | |
printf '%s\n' "${files[@]}" > deleteme.txt | |
) | |
done | |
----------------------------------------------------------------------------------------------------------- | |
download all links of given file type | |
wget -r -A.pdf https://overapi.com/git | |
----------------------------------------------------------------------------------------------------------- | |
for file in *. | |
do | |
sudo sed -i '/Copyright/d' ./*.html | |
done | |
sudo sed -i '/Support/d' ./*.html | |
sudo sed -i '/MIT/d' ./*.html | |
sudo sed -i '/License/d' ./*.html | |
sudo sed -i '/Contributors/d' ./*.html | |
sudo sed -i '/Copyright/d' ./*.html | |
sudo sed -i '/copyright/d' ./*.html | |
sudo sed -i '/Copyright © /d' ./*.html | |
sudo sed -i '/\.json/d' ./index.html | |
sudo sed -i '/\.gif/d' ./index.html | |
sudo sed -i '/\.png/d' ./index.html | |
sudo sed -i '/\.css/d' ./index.html | |
sudo sed -i '/\.js/d' ./index.html | |
sudo sed -i '/\.php/d' ./index.html | |
sudo sed -i '/\.md/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Remove any lines not contaning string text or blah | |
sudo sed -i '/\.html/!d' scrap.md | |
sudo sed -i '/\.html/!d' index.html | |
sudo sed -i '/\.js/!d' ./SCRAP.html | |
sudo sed -i '/CODE-MIRROR/d' ./resources.html | |
sudo sed -i '/!\[\](/d' ./lecture-notes.md | |
sudo sed -i '/\.html/d' ./index.html | |
sudo sed -i '/Exported from/d' ./*.html | |
sudo sed -i '/src="data:image/d' ./everyonescodepens.html | |
--------------------------------------------------------------------------------------------------------- | |
# Reinstall all npm packages | |
npm i npm-reinstall | |
reinstall | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/127/d' ./scrap.md | |
--------------------------------------------------------------------------------------------------------- | |
Delete Files Over certain Size: | |
find . -size +75M -a -print -a -exec rm -f {} \; | |
find . -size +98M -a -print -a -exec rm -f {} \; | |
ompare across forks, base-fork -> main). | |
find . -size +75M -a -exec rm -f {} \; | |
--------------------------------Recursivly pull and accept incomming merge changes------------------------------------------------------------------------- | |
<body> | |
<a href="https://github.com/bgoonz" class="github-corner" | |
aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" | |
style="z-index: 100000; fill:#194ccdaf; color:#fff; position: fixed; top: 20px; border: 0; left: 20px; transform: scale(-1.5, 1.5);" | |
aria-hidden="true"> | |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> | |
<path | |
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" | |
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"> | |
</path> | |
<path | |
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" | |
fill="currentColor" class="octo-body"></path> | |
</svg></a> | |
1865 | |
git pull -s recursive -X ours https://github.com/Web-Dev-Collaborative/archive-backup.git | |
git pull -s recursive -X ours https://github.com/bgoonz/Lambda.git | |
git pull -s recursive -X theirs url | |
git pull -s recursive -X theirs https://github.com/bgoonz/Lambda.git | |
--------------------------------------------------------------------------------------------------------- | |
Overwrite local repo: | |
git fetch origin | |
git reset --hard origin/master | |
--------------------------------------------------------------------------------------------------------- | |
Add text to the first line of every file of a certain extension in a given folder. | |
for f in *.txt; do printf '%s\n' 0a 'TEXT YOU WISH TO APPEND TO BEGINNING OF EVERY FILE' . x | ex "$f"; done | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://gist.githubusercontent.com/bgoonz/37bca66ce8441c688900b6f082f10560/raw/2e9a5966431d89b8ce6355e7b8039ba42554978b/CSS-Styling-for-Pandoc-generated-html.css"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://raw.githubusercontent.com/bgoonz/styling-templates/master/bootstrap3/assets/css/bootstrap.min.css"></head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
------------------------------------------------------How to add to end of file:------------------------------------------------------ | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
for f in *.html; do printf '%s\n' 0a '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body>;' . x | ex "$f"; done | |
echo "</body></html>" | tee -a *.html | |
--------------------------------------------------------------------------------------------------------- | |
Recursive NPM install: | |
Usage | |
$ npm-recursive-install | |
--------------------------------------------------------------------------------------------------------- | |
for filename in *mesibo*; do echo mv \"$filename\" \"${filename//mesibo/zumzi}\"; done > rename.md | |
for filename in *mesibo*; do mv "$filename" "${filename//mesibo/zumzi}"; done | |
for d in */ ; do | |
echo "$d" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
<form action="https://liveformhq.com/form/bfba7c80-a2f6-41a6-9c61-b2ad3d8e48c5" method="POST" accept-charset="utf-8"> | |
<input type="hidden" name="_utf8" value="✓"> | |
<!-- | |
NOTE: This is an optional field, if your form has a field named '_redirect', | |
The user will be redirected to this page after the submission is saved | |
--> | |
<input type="hidden" value="https://liveformhq.com/thank_you" name="_redirect" /> | |
<label for="name">Name</label> | |
<input type="text" id="name" name="name"> <br /> | |
<label for="email">Email</label> | |
<input type="text" id="email" name="email"> <br /> | |
<button type="submit">Submit</button> | |
</form> | |
--------------------------------------------------------------------------------------------------------- | |
Input Output error | |
wsl.exe --shutdown then Get-Service LxssManager | Restart-Service | |
--------------------------------------------------------------------------------------------------------- | |
Replace the string source with target in all files in the current directory and all sub-directories: | |
find . -type f -exec rename 's/source/target/' {} \; | |
Replace the string source with target in all directories in the current directory and all sub-directories: | |
find . -type d -exec rename 's/source/target/' {} \; | |
find . -type f -exec rename 's/\_/-/' {} \; | |
find . -type f -exec rename 's/\_gif//' {} \; | |
find . -type f -exec rename 's/\_jpg//' {} \; | |
find . -type f -exec rename 's/\.svg//' {} \; | |
find . -type f -exec rename 's/\~/\-/' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
I use this one-liner to remove invalid characters in subtitle files: | |
for f in *.srt; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
Only process *.srt files( * could be used in place of *.srt to process every file) | |
Removes all other characters except for letters A-Za-z, numbers 0-9, periods ".", and dash's "-" | |
Removes possible double or triple periods | |
Checks to see if the file name needs changing | |
If true, it renames the file with the mv command, then outputs the changes it made with the echo command | |
It works to normalize directory names of movies: | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.]/./g' -e 's/\.\.\././g' -e 's/\.\././g' -e 's/\.*$//'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
for f in */; do nf=$(echo "$f" |sed -e 's/[^A-Za-z0-9.-]/./g;s/\.\.\././g;s/\.\././g'); test "$f" != "$nf" && mv "$f" "$nf" && echo "$nf"; done | |
--------------------------------------------------------------------------------------------------------- | |
To remove any number of trailing spaces from file names you can use rename (prename) : | |
rename 's/ *$//' * | |
find ./ -type f -exec rename 's/ *$//' *' {} \; | |
find ./ -type d -exec rename 's/ *$//' * {} \; | |
--------------------------------------------------------------------------------------------------------- | |
This shell script sanitizes a directory recursively, to make files portable between Linux/Windows and FAT/NTFS/exFAT. It removes control characters, /:*?"<>\| and some reserved Windows names like COM0. | |
sanitize() { | |
shopt -s extglob; | |
filename=$(basename "$1") | |
directory=$(dirname "$1") | |
filename_clean=$(echo "$filename" | sed -e 's/[\\/:\*\?"<>\|\x01-\x1F\x7F]//g' -e 's/^\(nul\|prn\|con\|lpt[0-9]\|com[0-9]\|aux\)\(\.\|$\)//i' -e 's/^\.*$//' -e 's/^$/NONAME/') | |
if (test "$filename" != "$filename_clean") | |
then | |
mv -v "$1" "$directory/$filename_clean" | |
fi | |
} | |
export -f sanitize | |
sanitize_dir() { | |
find "$1" -depth -exec bash -c 'sanitize "$0"' {} \; | |
} | |
sanitize_dir './' | |
sanitize_dir './' | |
---------------------------------------------------OR------------------------------------------------------------ | |
#!/bin/bash | |
function sanitize_file_name { | |
echo -n $1 | perl -pe 's/[\?\[\]\/\\=<>:;,''"&\$#*()|~`!{}%+]//g;' -pe 's/[\r\n\t -]+/-/g;' | |
} | |
filename="Wh00t? it's a -- re@lly-weird {file&name} (with + Plus and__1% #of# [\$qRots\$!]).mov" | |
cleaned=$(sanitize_file_name "$filename") | |
echo original : "$filename" | |
echo sanitised: "$cleaned" | |
--------------------------------------------------------------------------------------------------------------- | |
Center-Line | |
<hr> | |
<center> | |
<img | |
src="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/23b9b236-746e-409c-8e86-30b4385e3b72/hr1-raypham.gif" | |
alt="hr-line" width="781" height="22"> | |
<p class="text spotlight">Documentation</p> | |
</center> | |
<hr> | |
--------------------------------------------------------------------------------------------------------------- | |
const findUp = require('find-up'); | |
findUp('test.html').then(filepath => { | |
console.log(filepath); | |
}); | |
--------------------------------------------------------------------------------------------------------------- | |
Extract TGZ | |
for file in `ls -1`; do | |
sudo tar -xvf "${file}" ; done | |
function extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; | |
*.tar.gz) tar xvzf $1 ;; | |
*.tar.xz) tar Jxvf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xvf $1 ;; | |
*.tbz2) tar xvjf $1 ;; | |
*.tgz) tar xvzf $1 ;; | |
*.zip) unzip -d `echo $1 | sed 's/\(.*\)\.zip/\1/'` $1;; | |
*.Z) uncompress $1 ;; | |
*.7z) 7z x $1 ;; | |
*) echo "don't know how to extract '$1'" ;; | |
esac | |
else | |
echo "'$1' is not a valid file!" | |
fi | |
} | |
find ./ -type f -name "*.tgz" -exec sudo tar -xvf "${file}" | |
-----------------------------Get tripple backtick code blocks---------------------------------------------------------------------------------- | |
sed -n '/^```/,/^```/ p' < input.file | |
--------------------------------------------------------------------------------------------------------------- | |
Recursivley remove files by name: | |
find . -name hts-log.txt -type f -exec rm -rf {} \; | |
find . -name cookies.txt -type f -exec rm -rf {} \; | |
find . -name fade.gif -type f -execcp rm -rf {} \; | |
find . -name right.html -type f -exec cp rm -rf {} \; | |
Recursivley remove folders by name. | |
find . -type f -exec sed -i '/Mirrored from/d' ./* {} \; | |
find . -type f -exec sed -i '/Exported from /d' ./* {} \; | |
find . -type f -exec sed -i '/define/d' ./* {} \; | |
--------------------------------------------------------------------------------------------------------------- | |
Passionate Web Developer, Electrical Engineer, Audio Engineer and Musician / Teacher! A passionate Web Developer, Electrical Engineer, Musician & Producer 🔭 Contract Web Development Relational Concepts 🌱 I’m currently learning React/Redux, Python, Java, Express, jQuery 👯 I’m looking to collaborate on Any web audio or open source educational tools. 🤝 | |
--------------------------------------------------------------------------------------------------------------- | |
error: refs/remotes/origin/depfu/update/core-siteother-pagesweeksweek-10sequelize-recipe-box-solution/npm/pug-3.0.2 does not point to a valid object! | |
#!/bin/sh | |
set -e | |
if [ $# -eq 0 ]; then | |
dir="." | |
else | |
dir="$1" | |
fi | |
if [ ! -d "$dir" ]; then | |
echo "not a dir: $dir" | |
exit 1 | |
fi | |
if [ ! -d "$dir/.git" ]; then | |
echo "not a git repo: $dir" | |
exit 1 | |
fi | |
cd "$dir" | |
files=$(find .git/refs -type f) | |
for f in $files; do | |
id=$(cat "$f") | |
if ! git rev-parse --quiet "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing ref $f with missing commit $id" | |
rm "$f" | |
fi | |
done | |
if [ ! -f .git/packed-refs ]; then | |
exit 0 | |
fi | |
packfiles=$(cat .git/packed-refs \ | |
| grep -v '#' \ | |
| awk '{print $2}') | |
for f in $packfiles; do | |
if ! git rev-parse --quiet --verify "$f" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
id=$(git rev-parse "$f") | |
if ! git rev-parse --quiet --verify "$id" \ | |
>/dev/null 2>&1; then | |
continue | |
fi | |
if ! git rev-parse --quiet --verify "$id^{commit}" \ | |
>/dev/null 2>&1; then | |
echo "Removing packed ref $f with missing commit $id" | |
git update-ref -d $f | |
fi | |
done | |
git config --system core.longpaths true | |
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 "*.xml" -type f -print | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
find . -name '.vscode' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
youtube-dl https://www.youtube.com/user/Mihirishere/videos | |
--------------------------------------------------------------------------------------------------------- | |
Remove duplicate lines from a text file | |
You can use this shell command: | |
COPY | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
httrack --ext-depth=3 https://www.textfixer.com/html/convert-url-to-html-link.php | |
httrack http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html -O "./temp" %e5 | |
httrack --ext-depth=4 http://jellydemos.com/html/muziq/muziq-hardrock/index-multipages.html | |
httrack --ext-depth=4 https://www.vickielasher.com/ | |
--------------------------------------------------------------------------------------------------------- | |
grab all links from website | |
lynx -dump https://distrokid.com/hyperfollow/mihirbeg/getting-there | awk '/http/{print $2}' > links2.txt | |
lynx -dump https://geeksforgeeks.org/top-10-useful-github-repos-that-every-developer-should-follow | awk '/http/{print $2}' > links.md | |
lynx -dump https://html.com/blog/100-web-development-cheat-sheets | awk '/http/{print $2}' > links.md | |
wget -qO- www.instagram.com/mihirbeg/ | | |
grep -Eoi '<a [^>]+>' | | |
grep -Eo 'href="[^\"]+"' | | |
grep -Eo '(http|https)://[^/"]+'>output.md | |
--------------------------------------------------------------------------------------------------------- | |
.*(?<=<script)(.*)(?=<\/script>).* | |
.*\./\.git.* | |
.*node_modules.* | |
find . -name "*.zip" -type f -print | |
find . -name "*.zip" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
REMOVE DUPLICATE LINES: | |
uniq -u input.txt output.txt | |
--------------------------------------------------------------------------------------------------------- | |
2.)find and delete all empty directories()===> | |
find . -empty -type d -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
3.)Find and delete all empty files()===> | |
find . -empty -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
4.)Recursive-unzip:()===> | |
find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done; | |
find . -name "*.zip" -type f -print -delete | |
--------------------------------------------------------------------------------------------------------- | |
add extension to every file in folder | |
for f in * ; do | |
mv "$f" "$f.html" | |
done | |
for f in * ; do | |
mv "$f" "$f.css" | |
done | |
--------------------------------------------------------------------------------------------------------- | |
delete lines contaning specific string: | |
sed -i '/\.git/d' ./index.html | |
2 | |
find . -type f -a \( -name "*.html" -o -name "*.js" -o -name "*.css" -o -name "*.md" \) -a -exec sed -i '/Copyright/d' '{}' + | |
sed -i '/Copyright/d' ./*.html | |
--------------------------------------------------------------------------------------------------------- | |
Remove lines of file contaning a string | |
sudo sed -i '/\.git/d' ./index.html | |
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' | |
--------------------------------------------------------------------------------------------------------- | |
DO a command once for every file in folder | |
rename 's/\.coffee$/.html/' *.coffee | |
for file in *. | |
do | |
rename 's/\.coffee$/.html/' *.coffee | |
done | |
for file in *. | |
do | |
sed '/Mirrored from/d' "$file" > "$file".new_file.html | |
done | |
--------------------------------------------------------------------------------------------------------- | |
sed -n -e '/<script>/,/<\/script>/p' getting-there.html >out.js | |
sed -i 's/<script>//g' out.js | |
sed -i 's/<\/script>//g' out.js | |
.*\./<script* | |
(?<=<script)(.*)(?=<\/script>) | |
--------------------------------------------------------------------------------------------------------- | |
sudo sed -i '/\.git/d' ./index.html | |
--------------------------------------------------------------------------------------------------------- | |
Resursivley delete node modules | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
--------------------------------------------------------------------------------------------------------- | |
5.) Remember Git Credentials: | |
git config --global credential.helper store | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
find . \( -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CONTRIBUTING.md" \) -exec rm -rf -- {} + | |
find . \( -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.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 -- {} + | |
--------------------------------------------------------------------------------------------------------- | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_website-components/0-DOJO/widgets-master/output/info/stats.json' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_00-4-all-time/_0-Random-Repo/zipped.zip' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_Resource-Hub-Mark_II/azagent/vstsagent.tar.gz' HEAD | |
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_00-4-all-time/_0-Random-Repo/zipped.zip' HEAD | |
--------------------------------------------------------------------------------------------------------- | |
nano | |
When you're done, hit CTRL+O to save and CTRL+X to exit Nano. You'll just need to restart the SSH server with one of the following commands. | |
$ systemctl restart sshd | |
$ service sshd restart | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley Create numbered folders: | |
n=1; | |
max=50; | |
while [ "$n" -le "$max" ]; do | |
mkdir "s$n" | |
n=`expr "$n" + 1`; | |
done | |
--------------------------------------------------------------------------------------------------------- | |
Command Line: Rename all files in current directory to a certain file extension: | |
forfiles /S /M * /C "cmd /c rename @file @fname.js" | |
forfiles /S /M * /C "cmd /c rename @file @fname.html" | |
--------------------------------------------------------------------------------------------------------- | |
The following command would rename all *.txt files to *.doc. | |
$ rename 's/\.txt$/.doc/' *.txt | |
$ rename 's/\.example$/.sql/' *.example | |
rename 's/\.js\.download$/.js/' *.js\.download | |
rename 's/\.html\.tmp$/.html/' *.html\.tmp | |
--------------------------------------------------------------------------------------------------------- | |
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -o "${0%.md}.html"' {} \; | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
Recursivley list every single file in the working directory... 1 per line: | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
write-to-txt-file | |
ls -R ./ | awk ' | |
/:$/&&f{s=$0;f=0} | |
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next} | |
NF&&f{ print s"/"$0 }' | |
--------for only html-files------------------------------------------------------------------------------ | |
find ./ | grep -i "\.html*$" | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
forfiles /S /M *.File /C "cmd /c rename @file @fname.js" | |
--------------------------------------------------------------------------------------------------------- | |
Recreate folder structure with only specific file types | |
find . -name '*.html' | cpio -pdm './original-mihir-html' | |
--------------------------------------------------------------------------------------------------------- | |
7.) ()===> | |
--------------------------------------------------------------------------------------------------------- | |
8.) Command Prompt: code --list-extensions | |
for /F "tokens=*" %A in (extensions.list) do code --install-extension %A | |
--------------------------------------------------------------------------------------------------------- | |
9.)Create a soft link in the home dir | |
ln -s /mnt/c/0-a-A-October | |
--------------------------------------------------------------------------------------------------------- | |
10.) | |
sudo apt update | |
sudo apt upgrade | |
git config --global user.name bryan | |
git config --global user.email [email protected] | |
sudo apt update | |
sudo apt install build-essential | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
. ./.bashrc | |
nvm install --lts | |
sudo apt install unzip | |
npm install -g mocha | |
npm audit fix -F | |
npm audit fix -f | |
npm install -g mocha | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install python3 | |
----------------------------------------------------------------------------------------------------------- | |
Command Line vscode | |
code --list-extensions | |
code --disable-extension <ext-name> | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
dockerd | |
----------------------------------------------------------------------------------------------------------- | |
killall node | |
----------------------------------------------------------------------------------------------------------- | |
sudo service postgresql stop | |
sudo service postgresql start | |
sudo service postgresql restart | |
---------------------------------------- | |
sed -e '/.git/ { | |
$!N | |
d | |
}'index.html | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. | |
--restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
--domains yoursite.com \ # Do not follow links outside this domain. | |
--no-parent \ # Don't follow links outside the directory you pass in. | |
https://www.instagram.com/mihirbeg/?hl=en | |
----------------------------------------------------------------------------------------------------------- | |
Copy file structure without the files: | |
rsync -a -f"+ */" -f"- *" './'/ './../'/ | |
rsync -a -f"+ */" -f"- *" source/ destination/ | |
----------------------------------------------------------------------------------------------------------- | |
----------------------------------------------------------------------------------------------------------- | |
#!/bin/sh | |
# find ./ | grep -i "\.*$" >files | |
find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files | |
listing="files" | |
out="" | |
html="index.html" | |
out="basename $out.html" | |
html="index.html" | |
cmd() { | |
echo ' <!DOCTYPE html>' | |
echo '<html>' | |
echo '<head>' | |
echo ' <meta http-equiv="Content-Type" content="text/html">' | |
echo ' <meta name="Author" content="Bryan Guner">' | |
echo '<link rel="stylesheet" href="./assets/prism.css">' | |
echo ' <link rel="stylesheet" href="./assets/style.css">' | |
echo ' <script async defer src="./assets/prism.js"></script>' | |
echo " <TITLE> directory </TITLE> </head>" | |
echo "" | |
echo '</head>' | |
echo '<body>' | |
echo "" | |
#################### continue with the HTML stuff: | |
echo "" | |
echo "" | |
echo "<ul>" | |
awk '{print "<li><a href=\""$1"\">",$1," </li>"}' $listing | |
# awk '{print "<li>"}; | |
# {print " <a href=\""$1"\">",$1,"</a></li> "}' \ $listing | |
echo "" | |
echo "</ul>" | |
echo "</body>" | |
echo "</html>" | |
} | |
cmd $listing --sort=extension >>$html | |
----------------------------------------------------------------------------------------------------------- | |
<pre><code> | |
#!/bin/bash | |
#Author: Raman Nv | |
link="#insert url here#" | |
#links were a set of strings with just the index of the video as the variable | |
num=3 | |
#first video was numbered 3 - weird. | |
ext=".mp4" | |
while [ $num -le 66 ] | |
do | |
wget $link$num$ext -P ~/Downloads/ | |
num=$(($num+1)) | |
done | |
</code></pre> | |
----------------------------------------------------------------------------------------------------------- | |
print a dummy text file in each folder | |
for x in "./"/*/; do | |
(cd "$x" | |
files=(*) | |
printf '%s\n' "${files[@]}" > filesNames.txt | |
) | |
done | |
1. https://teacode.io/ | |
2. https://www.datacamp.com/ | |
https://www.interview-db.com/search | |
<!doctype html> | |
<!--[if gt IE 9]><!--> | |
<html class="no-js " lang="en"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- Mobile Meta --> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<!-- Site Meta --> | |
<title>WebDev Resource Hub</title> | |
<meta name="keywords" | |
content="In, instanceof, Static, finally, arguments, public, Do, else, Const, Function, class*, return, let*, Catch, Eval, For, if, This, try, Break, debugger, Yield, extends*, enum*, Continue, export*, null, switch, private, New, throw, while, Case, await*, Delete, super*, default, Void, Var, protected, Package, Interface, False, typeof, implements, With, import*, True, Applications, Artificial Intelligence, Based, Business Development, CASE Tools, Circuit, Client-Server, Code Development, Computer Architecture, Computer Engineering, Computer Graphics, Computer Hardware, Computer Interface, Computer Modeling, Computer Operating Systems, Computer Programming Languages, Computer Science, Computer Simulation/Modeling, Computer Software, Computer Storage & Retrieval, Computer Systems Analysis, Computer Theory, Computer Vision, Computer/Data/Network Security, Cybernetics, Data, Database, Design, Digital Computers/Computing, Discrete Mathematics, End-User, Ethics/Values in Science and, Technology, Expert Systems, Files, Functional, Global, GUI, Hardware, Information Technology (IT), Installation, Internet, Java, Local Area Network (LAN), Management Information Systems, (MIS), Microsoft Certified Systems, Engineer (MCSE), Modifications, Network, Online, Parallel Algorithms, Parallel Programming, Pattern recognition, PCs, Performance, Peripherals, Printers, Program Management, Program Verification, Project, Real Time, Relational Database, Reports, Scripts, Software, Software Engineering, SQL, Structured Design, System Design, System Performance, System Requirements, Technology, Test, Tools, Topologies, Troubleshoot, Wide Area Network (WAN), Windows, Tape Drive, Technical Specifications, Terminals, Upgrade, VSAM, Workstation, UNIX, User Manual, Analytical Thinking, Attention to Detail, Dependability, Initiative, Achievement/Effort, Adaptability/Flexibility, Independence, Integrity, Persistence, Cooperation"> | |
<meta name="description" content="Resource-sharing-hub"> | |
<meta name="author" content="Bryan Guner"> | |
<!-- Site Icons --> | |
<script async src="https://kit.fontawesome.com/145ae317bb.js" crossorigin="anonymous"></script> | |
<!-- Basic --> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- Mobile Meta --> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<!-- Site Meta --> | |
<title>WEB-DEV-Resources</title> | |
<meta name="keywords" content=""> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Site Icons --> | |
<link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" /> | |
<link rel="apple-touch-icon" href="images/apple-touch-icon.png"> | |
<!-- Google Fonts --> | |
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700,900" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Droid+Serif:400,400i,700,700i" rel="stylesheet"> | |
<!-- Custom & Default Styles --> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" href="css/font-awesome.min.css"> | |
<link rel="stylesheet" href="css/carousel.css"> | |
<link rel="stylesheet" href="css/animate.css"> | |
<link rel="stylesheet" href="style.css"> | |
<script src="./youtube.js"></script> | |
<!--[if lt IE 9]> | |
<script src="js/vendor/html5shiv.min.js"></script> | |
<script src="js/vendor/respond.min.js"></script> | |
<![endif]--> | |
<!-- | |
jQuery Files --> | |
<script async defer src="js/jquery.min.js"></script> | |
<script async defer src="js/bootstrap.min.js"></script> | |
<script async defer src="js/carousel.js"></script> | |
<script async defer src="js/animate.js"></script> | |
<script async defer src="js/custom.js"></script> | |
<!-- VIDEO BG PLUGINS --> | |
<script async defer src="js/videobg.js"></script> | |
<script async src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script async src="./../javascripts/sentry.js"></script> | |
<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=G-74W6FHPF29"></script> | |
<script async > | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'G-74W6FHPF29'); | |
</script> | |
<script async defer src="./js/main-jquery.js"></script> | |
</head> | |
<!-------------------------END-OF-HEADER--------------------------> | |
<body> | |
<!-- LOADER --> | |
<div id="preloader"> | |
<img class="preloader" src="images/loader.gif" alt=""> | |
</div><!-- end loader --> | |
<!-- END LOADER --> | |
<div id="wrapper"> | |
<div class="fullscreen-bg" height="fullscreen" ;> | |
<video loop muted autoplay poster="img/videoframe.jpg" class="fullscreen-bg__video"> | |
<source src="./images/ezgif.com-gif-maker.mp4" type="video/mp4"> | |
</video> | |
</div> | |
<header class="header"> | |
<div class="topbar clearfix"> | |
<div class="container"> | |
<div class="row-fluid"> | |
<div class="col-md-6 col-sm-6 text-left"> | |
<p> | |
<strong><i class="fa fa-phone"></i></strong> +551-254-5505 | |
<strong><i class="fa fa-envelope"></i></strong> <a class="btn" | |
href=" https://mail.google.com/mail/u/0/h/ ">[email protected]</a> | |
</p> | |
</div><!-- end left --> | |
<div class="col-md-6 col-sm-6 hidden-xs text-right"> | |
<div class="social"> | |
<a class="linkedin" href="https://www.linkedin.com/in/bryan-guner-046199128/" data-tooltip="tooltip" | |
data-placement="bottom" title="Linkedin"><i class="fa fa-linkedin"></i></a> | |
<a class="github" href="https://github.com/bgoonz" data-tooltip="tooltip" data-placement="bottom" | |
title="github"><i class="fa fa-github"></i></a> | |
<a class="pinterest" href="https://www.pinterest.com/bryanguner" data-tooltip="tooltip" | |
data-placement="bottom" title="Pinterest"><i class="fa fa-pinterest"></i></a> | |
</div><!-- end social --> | |
</div><!-- end left --> | |
</div><!-- end row --> | |
</div><!-- end container --> | |
</div><!-- end topbar --> | |
<div class="container"> | |
<nav class="navbar navbar-default yamm"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" | |
aria-expanded="false" aria-controls="navbar"> | |
<span class="sr-only">Toggle navigation</span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<div class="logo-normal"> | |
<a class="navbar-brand" href="./../0-assets/planning/documentation/portfolio/tree-diagram.html"><img | |
src="./../0-assets/images/logo.png" alt=""></a> | |
</div> | |
</div> | |
<div id="navbar" class="navbar-collapse collapse"> | |
<ul class="nav navbar-nav navbar-right"> | |
<li><a class="btn" href="./index.html">HOME-hit-Refresh</a></li> | |
<li><a class="btn" href="./blog.html">Blog</a></li> | |
<li><a class="btn" href="./resources.html">Resources-Directory</a></li> | |
<li><a class="btn" href="./other-pages/sandbox.html">SandBox</a></li> | |
<li class="dropdown yamm-fw yamm-half"><a class="btn" href="#" data-toggle="dropdown" | |
class="dropdown-toggle active">Weeks <b class="fa fa-angle-down"></b></a> | |
<ul class="dropdown-menu"> | |
<li> | |
<div class="yamm-content clearfix"> | |
<div class="row-fluid"> | |
<div class="col-md-6 col-sm-6"> | |
<h4>Course Pages</h4> | |
<ul> | |
<li><a href="./other-pages/weeks/week-1.html">week 01</a></li> | |
<li><a href="./other-pages/weeks/week-2.html">week 02</a></li> | |
<li><a href="./other-pages/weeks/week-3.html">week 03</a></li> | |
<li><a href="./other-pages/weeks/week-4.html">week 04</a></li> | |
<li><a href="./other-pages/weeks/week-5.html">week 05</a></li> | |
<li><a href="./other-pages/weeks/week-6.html">week 06</a></li> | |
<li><a href="./other-pages/weeks/week-7.html">week 07</a></li> | |
<li><a href="./other-pages/weeks/week-8.html">week 08</a></li> | |
<li><a href="./other-pages/weeks/week-9.html">week 09</a></li> | |
<li><a href="./other-pages/weeks/week-10.html">week 10</a></li> | |
<li><a href="./other-pages/weeks/week-11.html">week 11</a></li> | |
<li><a href="./other-pages/weeks/week-12.html">week 12</a></li> | |
<li><a href="./other-pages/weeks/week-13.html">week 13</a></li> | |
<li><a href="./other-pages/weeks/week-14.html">week 14</a></li> | |
<li><a href="./other-pages/weeks/week-15.html">week 15</a></li> | |
<li><a href="./other-pages/weeks/week-16.html">week 16</a></li> | |
<li><a href="./other-pages/weeks/week-17.html">week 17</a></li> | |
<li><a href="./other-pages/weeks/week-18.html">week 18</a></li> | |
<li><a href="./other-pages/weeks/week-19.html">week 19</a></li> | |
<li><a href="./other-pages/weeks/week-20.html">week 20</a></li> | |
<li><a href="./other-pages/weeks/week-21.html">week 21</a></li> | |
<li><a href="./other-pages/weeks/week-22.html">week 22</a></li> | |
<li><a href="./other-pages/weeks/week-23.html">week 23</a></li> | |
<li><a href="./other-pages/weeks/week-24.html">week 24</a></li> | |
</ul> | |
</div> | |
<div class="col-md-6 col-sm-6"> | |
<div class="menu-widget text-center"> | |
<div class="image-wrap entry"> | |
<img src="upload/course_01.pgj" alt="" class="img-responsive"> | |
<div class="magnifier"> | |
<a class="btn" href="#" title=""><i class="flaticon-add"></i></a> | |
</div> | |
</div><!-- end image-wrap --> | |
<h5><a class="btn" | |
href="./../2-content/core-content/node-npm/npm-reademe-comp/index.html">npm-quicksheet</a> | |
</h5> | |
</div><!-- end widget --> | |
</div> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</li> | |
<li><a class="btn" href="page-contact.html">Contact</a></li> | |
<li><a class="btn" href="./../index.html">Back To Landing Page</a></li> | |
</ul> | |
</div> | |
</nav><!-- end navbar --> | |
</div><!-- end container --> | |
</header> | |
<section id="home" class="video-section js-height-full"> | |
<div class="overlay"></div> | |
<div class="home-text-wrapper relative container"> | |
<div class="home-message"> | |
<p>Web Dev Student Resources</p> | |
<p><small>This site is a constant work in progress... and my very well be pretty broken at any given point in | |
time</small></p> | |
<div class="btn-wrapper"> | |
<div class="text-center"> | |
</div> | |
</div><!-- end row --> | |
</div> | |
</div> | |
<div class="slider-bottom"> | |
</div> | |
</section> | |
<!---------------------------------------------------------------------------------------------------------> | |
<section class="section"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 hidden-sm hidden-xs"> | |
<div class="custom-module"> | |
<img src="images/fullstack.PNG" alt="" class="img-responsive wow slideInLeft"> | |
</div><!-- end module --> | |
</div><!-- end col --> | |
<div class="col-md-8"> | |
<div class="custom-module p40l"> | |
<h2>My goal is to create an interactive library of resources and projects </h2> | |
<hr class="invis"> | |
<div class="row"> | |
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 first"> | |
<p> | |
</p> | |
</div><!-- end col-lg-4 --> | |
</div><!-- end module --> | |
</div><!-- end col --> | |
</div><!-- end row --> | |
</div><!-- end container --> | |
<!---------------------------------------------------------------------------------------------------------------> | |
<section class="section gb"> | |
<div class="container"> | |
<div class="section-title text-center"> | |
<!-- <h3>Topic Overviews</h3> | |
<p> this is where I will accumulate blog posts about web development that are out of the scope of what I | |
am currently learning!</p> --> | |
</div><!-- end title --> | |
<!-----------------------------------------------1------------------------------------------------------------> | |
<div id="owl-01" class="owl-carousel owl-theme owl-theme-01"> | |
<!---------------------------------------------------------------------------> | |
<div class="caro-item"> | |
<div class="course-box"> | |
<div class="image-wrap entry"> | |
<img src="upload/matrix-250.gif" alt="" class="img-responsive"> | |
<div class="magnifier"> | |
<a> <i class="flaticon-add"></i></a> | |
</div> | |
</div><!-- end image-wrap --> | |
<div class="course-details"> | |
<h4> | |
<small>general comp-sci</small> | |
<a class="btn" | |
href="./other-pages/blog-posts/9-thigs-you-should-know-about/What every computer science major should know.html" | |
title="">Click | |
Here!!</a> | |
</h4> | |
<p>9-things every developer should know</p> | |
</div><!-- end details --> | |
<div class="course-footer clearfix"> | |
<div class="pull-left"> | |
<ul class="list-inline"> | |
</ul> | |
</div><!-- end left --> | |
<div class="pull-right"> | |
<ul class="list-inline"> | |
</ul> | |
</div><!-- end left --> | |
</div><!-- end footer --> | |
</div><!-- end box --> | |
</div><!-- end col ---> | |
<!-----------------------------------------------2------------------------------------------------------------> | |
<div class="caro-item"> | |
<div class="course-box"> | |
<div class="image-wrap entry"> | |
<img src="upload/best-prac-250.gif" alt="" class="img-responsive"> | |
<div class="magnifier"> | |
<a class="btn" href="#" title=""><i class="flaticon-add"></i></a> | |
</div> | |
</div><!-- end image-wrap --> | |
<div class="course-details"> | |
<h4> | |
<small>Javascript</small> | |
<a class="btn" | |
href="./other-pages/blog-posts/best-prac-extension-guide/js-tools-and-best-prac.html" | |
title="">Click | |
Here!!</a> | |
</h4> | |
<p>JS Best Practice & Tools</p> | |
</div><!-- end details --> | |
<div class="course-footer clearfix"> | |
<div class="pull-left"> | |
<ul class="list-inline"> | |
</ul> | |
</div><!-- end left --> | |
<div class="pull-right"> | |
<ul class="list-inline"> | |
</ul> | |
</div><!-- end left --> | |
</div><!-- end footer --> | |
</div><!-- end box --> | |
</div><!-- end col --> | |
<!-----------------------------------------------3------------------------------------------------------------> | |
<div class="caro-item"> | |
<div class="course-box"> | |
<div class="image-wrap entry"> | |
<img src="./other-pages/blog-posts/best-prac-extension-guide/Design-Principles/final-html.JPG" | |
alt="" class="img-responsive"> | |
<div class="magnifier"> | |
<a class="btn" href="./../other-pages/blog-post" title=""><i class="flaticon-add"></i></a> | |
</div> | |
</div><!-- end image-wrap --> | |
<div class="course-details"> | |
<h4> | |
<small>HTML</small> | |
<a class="btn" | |
href="./other-pages/blog-posts/best-prac-extension-guide/Design-Principles/HTML-Design-Principles.html" | |
title="">Click Here!!</a> | |
</h4> | |
<p>Solid HTML Design Principles</p> | |
</div><!-- end details --> | |
<div class="course-footer clearfix"> | |
<div class="pull-left"> | |
<ul class="list-inline"> | |
</ul> | |
</div><!-- end left --> | |
<div class="pull-right"> | |
<ul class="list-inline"> | |
</ul> | |
</div><!-- end left --> | |
</div><!-- end footer --> | |
</div><!-- end box --> | |
</div><!-- end col --> | |
<!-----------------------------------------------end-----------------------------------------------------------> | |
<hr class="invis"> | |
<div class="section-button text-center"> | |
</div> | |
</div><!-- end container --> | |
</div> | |
</section> | |
<!-------------------------------------------------------------------------------------------------------------------------------------------------------------> | |
<section class="section db p120"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<div class="tagline-message text-center"> | |
<div class="footer"> | |
<h1>week-overview</h1> | |
<iframe width="100%" height="500px" | |
src="./../2-content/core-content/USEFUL/objectives-combinepdf.pdf"> </iframe> | |
</div> | |
<div> | |
</div> | |
<h3> | |
The spirit behind making this site: | |
</h3> | |
<span id="myId"></span> | |
<br /> | |
<br /> | |
<pre id="myCode"></pre> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!--------------------------------------------White Space------------------------------------------------------> | |
<p> | |
<p> | |
<p> | |
<p> | |
<p> | |
<br> | |
<br> | |
<br> | |
<br> | |
<br> | |
</p> | |
</p> | |
</p> | |
</p> | |
</p> | |
<!--------------------------------------------White Space------------------------------------------------------> | |
<!--------------------------------------------White Space------------------------------------------------------> | |
<p> | |
<p> | |
<p> | |
<p> | |
<p> | |
<br> | |
<br> | |
<footer class="footer-area section_gap"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-lg-2 col-md-6 single-footer-widget footer-text m-0 text-white"> | |
<h4>Navigate</h4> | |
<ul> | |
<li><a href="#">Link City</a></li> | |
<li><a href="#">Contact</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
</ul> | |
</div> | |
<div class="col-lg-2 col-md-6 single-footer-widget footer-text m-0 text-white"> | |
<h4>Resources</h4> | |
<ul> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
</ul> | |
</div> | |
<div class="col-lg-2 col-md-6 single-footer-widget footer-text m-0 text-white"> | |
<h4>Tools</h4> | |
<ul> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
</ul> | |
</div> | |
<div class="col-lg-2 col-md-6 single-footer-widget footer-text m-0 text-white"> | |
<h4>Resources</h4> | |
<ul> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
<li><a href="#">PLACEHOLDER</a></li> | |
</ul> | |
</div> | |
<div class="col-lg-4 col-md-6 single-footer-widget footer-text m-0 text-white"> | |
<h4></h4> | |
<p></p> | |
<div class="form-wrap" id="mc_embed_signup"> | |
</div> | |
</div> | |
</div> | |
<!--------------------------------------------White Space------------------------------------------------------> | |
<!-- | |
</div> | |
</footer> | |
<br> | |
<br> | |
<br> | |
</p> | |
</p> | |
</p> | |
</p> | |
</p> | |
<!--------------------------------------------White Space------------------------------------------------------> | |
</div> | |
</section> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment