sh ./scripts/diff_deleted_file.sh ./fileName.js ./fileName.ts [commit_from_deletion] [--prettier] | pbcopy
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
| wrap any function in | |
| javascript: (function () { | |
| // javascript goes here | |
| })(); | |
| minify and then create a bookmark with the URL as the minified JavaScript | |
| // grayscale all images without an alt tag | |
| const css = document.createElement("style"); |
I would very much like there to be a WEB standard for this, but unfortunately there is not!
I studied this for several days and gathered a lot of information and I will share it with you.
Before developing or using an internet hack you need to know that there are 2 types of Autocomplete. There is the autocomplete of the page and the autocomplete of the browser.
This is the global browser autocomplete. It appears whenever you define autocomplete="off" or when you define no autocomplete but define type="email" for example. The global autocomplete suggests emails you've used on other sites. The global autocomplete has a manage button at the bottom and can be disabled in the browser config.

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
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
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
| <template> | |
| <div> | |
| <h1> {{ message }} </h1> | |
| <div | |
| </template> | |
| <script> | |
| export default { | |
| /* Child component registration */ | |
| components: {}, | |
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
| import React from 'react'; | |
| const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children; | |
| const Header = ({shouldLinkToHome}) => ( | |
| <div> | |
| <ConditionalWrap | |
| condition={shouldLinkToHome} | |
| wrap={children => <a href="/">{children}</a>} | |
| > |
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
| // O(n + n + n/2) | |
| // O(2n + n/2) | |
| // O(2.5n) | |
| // O(n) | |
| public boolean isPalindrome(String input) { | |
| // replaceAll - n times | |
| input = input.replaceAll("\\s",""); | |
| // replaceAll - n times | |
| int n = input.length(); |
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
| # first run brew install ffmpeg && brew install imagemagick | |
| # next, add lines 6 - 9 into your .zshrc or .bashrc file, depending on your shell you use ( zsh or bash ) | |
| # restart your terminal! | |
| # then call like "movtogif in.mov out.gif" | |
| movtogif(){ | |
| ffmpeg -i "$1" -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - |\ | |
| convert -delay 5 -layers Optimize -loop 0 - "$2" | |
| } |
NewerOlder