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
| watch -n seconds -x command | |
| Example: | |
| watch -n 1 -x \ date >> testfile.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
| const sleep = time => new Promise(res => setTimeout(res, time, "done sleeping")); | |
| sleep(2000).then(msg => console.log(msg)); |
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
| # A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows | |
| # | |
| # Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only: | |
| # Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process | |
| # | |
| # To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ ) | |
| # .\WhateverScriptName.ps1 | |
| # ------------------------------------------------------------------------------------------- | |
| # Script by ThioJoe - https://github.com/ThioJoe | |
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
| [...] | |
| super(props) | |
| this.timeout = 0 | |
| [...] | |
| this._sampleFunction = this.sampleFunction.bind(this) | |
| [...] |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="refresh" content="0; URL=https://yourNewURLHere" /> | |
| </head> | |
| </html> |
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
| setInterval(function () { | |
| video = document.getElementsByTagName('ytd-playlist-video-renderer')[0]; | |
| video.querySelector('#primary button[aria-label="Action menu"]').click(); | |
| var things = document.evaluate( | |
| '//span[contains(text(),"Remove from")]', | |
| document, | |
| null, | |
| XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, |
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
| //This code was made for a suitable use-case of mine. It will require code changes for your use-case. | |
| //This code makes so every 10 seconds, the vertical scroll div goes down an item at time. | |
| sleep(5000).then(() => { | |
| let views = document.getElementsByClassName("arrayOfVerticalDivsToCreateAnScrollLoopEffect") | |
| for(let view in views){ | |
| view = views[view] | |
| this._createScroll(view) | |
| } | |
| }) |
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
| /usr/lib/firefox/firefox; sleep 0.2; wmctrl -ia $(wmctrl -l Firefox | grep "Mozilla Firefox" | sort -r | head -n 1 | cut -d " " -f 1) |
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
| let curr = new Date() | |
| let first = curr.getDate() - curr.getDay() + 1 | |
| let monday = new Date(curr.setDate(first)) | |
| let sunday = new Date(curr.setDate(monday.getDate() + 6)) | |
| const daysOfTheWeek = [] | |
| for (let date = monday; date <= sunday; date.setDate(date.getDate() + 1)){ | |
| const day = new Date(date.valueOf()) | |
| daysOfTheWeek.push(day) | |
| } |
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
| string.replace(/[-{}/:><=+_'"|.;,?%0-9!@#$¨&*()]/, '') |