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
| var arr1 = [0, 1, 2]; | |
| var arr2 = [3, 4, 5]; | |
| arr1 = [...arr2, ...arr1]; // arr1 is now [3, 4, 5, 0, 1, 2] | |
| // source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator |
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
| #!/bin/bash | |
| # This program is free software. It comes without any warranty, to | |
| # the extent permitted by applicable law. You can redistribute it | |
| # and/or modify it under the terms of the Do What The Fuck You Want | |
| # To Public License, Version 2, as published by Sam Hocevar. See | |
| # http://sam.zoy.org/wtfpl/COPYING for more details. | |
| for fgbg in 38 48 ; do #Foreground/Background | |
| for color in {0..256} ; do #Colors |
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
| #!/bin/bash | |
| # This program is free software. It comes without any warranty, to | |
| # the extent permitted by applicable law. You can redistribute it | |
| # and/or modify it under the terms of the Do What The Fuck You Want | |
| # To Public License, Version 2, as published by Sam Hocevar. See | |
| # http://sam.zoy.org/wtfpl/COPYING for more details. | |
| #Background | |
| for clbg in {40..47} {100..107} 49 ; do |
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
| sed -n -e 's/^.*printonlywhatsafterme //p' textfile.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
| #RUN AS ROOT | |
| # To get samba to recognize changes to its smb.conf *without restart*, as root: | |
| # 1) First test your configuration file for errors: | |
| testparm /path/to/smb.conf; echo $? | |
| #If it exits '0' you're good to go. | |
| # 2) Find the parent SMBD | |
| ps -ef | grep smbd |
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
| Testing gist command line |
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 contains string | |
| stringContains() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; } | |
| # Used like so | |
| SRC_STRING="this is a sample string where TEST we want to check for the word 'TEST'" | |
| if stringContains "TEST" "$SRC_STRING"; then | |
| echo "Found TEST in SRC_STRING" | |
| else | |
| echo "Couldn't find TEST in SRC_STRING" |
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
| ffmpeg -i $(IN) -c:v libvpx -pass 1 -an -f rawvideo -y /dev/null # Generates ffmpeg2pass-0.log | |
| ffmpeg -i $(IN) -c:v libvpx -pass 2 -f webm -b:v 400K -crf 10 -an -y $(OUT).webm |
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
| *{cursor:url("//URI.to.customcursor.png"),default!important}* | |
| body a,.arrow,button,a.progress,div.expando-button{cursor:url("//URI.to.customcursor.png"),!important} |
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
| ' !x[$1]++' |