🏳️⚧️
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
| // taken from here: https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement | |
| function onMouseUp(e) { | |
| const activeTextarea = document.activeElement; | |
| const selection = activeTextarea.value.substring( | |
| activeTextarea.selectionStart, activeTextarea.selectionEnd | |
| ); | |
| } |
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 randomHexColor = () => "#" + Math.floor(Math.random()*16777215).toString(16); |
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 hours = 12; | |
| var suffix = hours <= 12 ? "PM" : "AM"; | |
| hours = ((hours + 11) % 12 + 1) + suffix; | |
| console.log(hours); |
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
| <head> | |
| <!-- jQuery --> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
| <!-- jQuery ui --> | |
| <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> | |
| </head> |
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
| // document ready shorthand: https://www.w3schools.com/jquery/jquery_syntax.asp | |
| $(function(){ | |
| // jQuery methods go here... | |
| }); |
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
| /* taken from: https://stackoverflow.com/a/13515693/14111707 */ | |
| .center { | |
| display: flex; | |
| justify-content: center; | |
| align-content: center; | |
| flex-direction: column; | |
| /* Column | row */ | |
| text-align: center; | |
| } |
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
| map tr_walkway_rc2 | |
| sv_cheats 1 | |
| sv_allow_point_servercommand always | |
| retry | |
| jointeam red |
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
| " auto save file when it is modified | |
| augroup auto_save | |
| autocmd! | |
| " call save function | |
| autocmd BufModifiedSet * call AutoSave() | |
| augroup end | |
| " save function that is called when buffer is modified | |
| function AutoSave() | |
| if (bufname() != "" && &buftype == "" && &filetype != "") |
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
| gamemoderun %command% -noforcemaccel -noforcemspd -novid -nojoy -fullscreen -nosteamcontroller -nohltv -particles 1 -precachefontchars -noquicktime |
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
| " taken from https://vi.stackexchange.com/a/2187/35229 | |
| nnoremap <C-e> :set nomore <Bar> :ls <Bar> :set more <CR>:b<Space> |