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
| " VimL source. | |
| Plug 'Shougo/neco-vim' | |
| Plug 'https://github.com/neoclide/coc-neco' | |
| " CSS source. | |
| Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile --force'} | |
| " JSON source. | |
| Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile --force'} |
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
| UPDATE "messages" | |
| SET | |
| "meta" = jsonb_set("meta", '{mode}', concat('"', "text", '"')::jsonb), | |
| "text" = concat("nick", ' set ', "text", ' on ', "meta"->>'param'); |
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
| UPDATE "messages" | |
| SET | |
| "meta" = jsonb_set("meta", '{mode}', concat('"', "text", '"')::jsonb), | |
| "text" = concat("nick", ' set ', "text", ' on ', "meta"->>'param'); |
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
| tell application "System Events" | |
| tell process "NotificationCenter" | |
| set numwins to (count windows) | |
| repeat with i from numwins to 1 by -1 | |
| click button "Close" of window i | |
| click button "Mark as Read" of window i | |
| end repeat | |
| end tell | |
| end tell |
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
| function closeNotifications() | |
| local s = [[ | |
| tell application "System Events" | |
| tell process "NotificationCenter" | |
| set numwins to (count windows) | |
| repeat with i from numwins to 1 by -1 | |
| click button "Close" of window i | |
| end repeat | |
| end tell | |
| end tell |
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
| process.on('SIGTERM', async () => { | |
| logger.info(`Received SIGTERM, quitting connections...`) | |
| const state = store.getState() | |
| _.forEach(state.ircClients, ircClient => { | |
| ircClient.quit() | |
| }) | |
| await pollUntil(async () => { |
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
| aux() { | |
| ps aux | head -n 1 | |
| ps aux | grep -i $@ | grep -v 'grep -i' | |
| } | |
| auxpid() { | |
| aux $@ | awk '{print $2}' | tail -n 1 | |
| } |
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
| ! ~ python | |
| Python 2.7.16 (default, Mar 4 2019, 09:01:38) | |
| [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> 'f' in 'foo' | |
| True | |
| >>> keywords = ['foo', 'bar'] | |
| >>> text = 'lala foo' | |
| >>> [keyword for keyword in keywords if keyword in text] | |
| ['foo'] |
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
| diff --git a/backend/package.json b/backend/package.json | |
| index 21a1462..166172c 100644 | |
| --- a/backend/package.json | |
| +++ b/backend/package.json | |
| @@ -9,6 +9,7 @@ | |
| "prettier": "^1.14.3" | |
| }, | |
| "dependencies": { | |
| + "@koa/cors": "^2.2.3", | |
| "bcrypt": "^3.0.0", |
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
| hs.window.filter.new():setDefaultFilter{}:subscribe(hs.window.filter.windowCreated, function(window) | |
| local windowFrame = window:frame() | |
| local screenFrame = window:screen():frame() | |
| windowFrame.x = screenFrame.x | |
| windowFrame.y = screenFrame.y | |
| windowFrame.w = screenFrame.w | |
| windowFrame.h = screenFrame.h | |
| window:setFrame(windowFrame) | |
| end) |