most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| // NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
| { | |
| // Settings | |
| "passfail" : false, // Stop on first error. | |
| "maxerr" : 100, // Maximum error before stopping. | |
| // Predefined globals whom JSHint will ignore. | |
| "browser" : true, // Standard browser globals e.g. `window`, `document`. |
| // Make strings safe for innerHTML and attribute insertion (templates): | |
| var escapeHTML = (function() { | |
| var entityMap = { | |
| '&': '&', | |
| '<': '<', | |
| '>': '>', | |
| '"': '"', | |
| "'": ''' | |
| }, | |
| re = /[&<>"']/g; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| function simpleSearch(text, str) { | |
| var matches = []; | |
| for (var i = 0; i <= text.length; i++) { | |
| if (matchesAtIndex(i, text, str)) { | |
| matches.push(i); | |
| } | |
| } | |
| return matches; | |
| } |
| // ==UserScript== | |
| // @name Trello Syntax Highlight | |
| // @namespace https://gist.github.com/AsyncWizard | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author AsyncWizard | |
| // @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js | |
| // @resource https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/github.min.css | |
| // @match https://trello.com/* | |
| // @grant none |
| Navigates? | declarative? | Makes GET, triggers loader | Makes POST, triggers action | No requests |
|---|---|---|---|---|
| navigates | declarative | <Link to=""><Form method="get"> |
<Form method="post"> |
<Link to="#..."> |
| navigates | imperative | navigate()setSearchParams() |
submit() |
navigate("#") |
| stays | declarative | <fetcher.Form method="get"> |
<fetcher.Form method="post"> |
(doesn't make sense) |
| stays | imperative | fetcher.load() |
fetcher.submit() |
(doesn't make sense) |
where
| <html> | |
| <head> | |
| <title>grid</title> | |
| <style> | |
| body {padding: 0; margin: 0;} | |
| .container { | |
| display: grid; | |
| grid-template-rows: 200px repeat(4, 100px); | |
| grid-template-columns: repeat(4, 1fr); | |
| grid-template-areas: "header header header header" |
| /* Ultra lightweight Github REST Client */ | |
| // original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const token = 'github-token-here' | |
| const githubClient = generateAPI('https://api.github.com', { | |
| headers: { | |
| 'User-Agent': 'xyz', | |
| 'Authorization': `bearer ${token}` | |
| } | |
| }) |