const shade = 100;
type Shade = 100;
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
| /** | |
| * Currying vs Partial Application | |
| * Closures | |
| * A function which returns a function that | |
| * can has access to the returned function's scope. | |
| * function example(param){ | |
| * let a = 123; | |
| * return function(otherParam){ | |
| * //both param and otherParam and a are available 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
| let mapleader=" " | |
| """ Plugins -------------------------------- | |
| set surround | |
| set multiple-cursors | |
| set commentary | |
| set argtextobj | |
| set easymotion | |
| set textobj-entire | |
| set ReplaceWithRegister |
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
| set ignorecase | |
| set smartcase | |
| set scrolloff=3 " 3 lines above/below cursor when scrolling | |
| " Emulated Plugins | |
| set surround | |
| " set easymotion | |
| set NERDTree | |
| " Copy to system clipboard as well |
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
| " To get a list of Actions run `:actionlist ` | |
| " let mapleader = ',' | |
| " let mapleader = " " | |
| let mapleader = "\<SPACE>" | |
| set ignorecase smartcase | |
| set NERDTree | |
| set hlsearch | |
| set showmode | |
| set scrolloff=5 |
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
| /* Using a JavaScript proxy for a super low code REST client */ | |
| // via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
| // also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
| const createApi = (url) => { | |
| return new Proxy({}, { | |
| get(target, key) { | |
| return async function(id = "") { | |
| const response = await fetch(`${url}/${key}/${id}`) | |
| if (response.ok) { | |
| return response.json(); |
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
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| let domStyle = document.getElementById('domStylee'); | |
| if (domStyle) { | |
| document.body.removeChild(domStyle); | |
| return; | |
| } | |
| domStyle = document.createElement("style"); | |
| domStyle.setAttribute('id', 'domStylee'); |
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
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var domStyle = document.createElement("style"); | |
| domStyle.append( | |
| '* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\ | |
| * * { background-color: rgba(0,255,0,.2) !important; }\ | |
| * * * { background-color: rgba(0,0,255,.2) !important; }\ | |
| * * * * { background-color: rgba(255,0,255,.2) !important; }\ | |
| * * * * * { background-color: rgba(0,255,255,.2) !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
| /*! NOTE: These are just recommended default global styles, edit as required */ | |
| @import ('Import reset stylesheet here, (I recommend modern-normalize) or even better, import the reset stylesheet in the HTML as the first imported stylesheet'); | |
| ::selection { /* Optional */ | |
| /* It can be really hard to read highlighted text with a text-shadow, it should be removed when selected */ | |
| text-shadow: none; | |
| /* NOTE: Using this means the color and background-color are set to transparent for selected text... */ | |
| /* So you can customise your styles below */ |
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
| position: absolute; | |
| width: 1px; | |
| height: 1px; | |
| margin: -1px; | |
| border: 0; | |
| padding: 0; | |
| white-space: nowrap; | |
| clip-path: inset(100%); |
NewerOlder