-
CTRL + A— Move to the beginning of the line -
CTRL + E— Move to the end of the line -
CTRL + [left arrow]— Move one word backward (on some systems this is ALT + B) -
CTRL + [right arrow]— Move one word forward (on some systems this is ALT + F) -
CTRL + U— (bash) Clear the characters on the line before the current cursor position -
CTRL + U—(zsh) If you're using the zsh, this will clear the entire line -
CTRL + K— Clear the characters on the line after the current cursor position -
ESC + [backspace]— Delete the word in front of the cursor
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Created: 2010/12/05 | |
| // Updated: 2018/09/12 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
| // |
| #!/bin/sh | |
| #put this shellcode on cake vendors directory, then do it. | |
| # origin code from http://cakephp.lighthouseapp.com/projects/42648/phpunit-migration-hints | |
| mkdir -p ~/tmp/cake_phpunit | |
| wget --no-check-certificate https://github.com/sebastianbergmann/phpunit/tarball/3.5.5 -O ~/tmp/cake_phpunit/phpunit.tgz | |
| wget --no-check-certificate https://github.com/sebastianbergmann/phpunit-mock-objects/tarball/1.0.3 -O ~/tmp/cake_phpunit/mock_objects.tgz | |
| wget --no-check-certificate https://github.com/sebastianbergmann/php-code-coverage/tarball/1.0.2 -O ~/tmp/cake_phpunit/code_coverage.tgz |
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 tab color commands | |
| # https://iterm2.com/documentation-escape-codes.html | |
| if [[ -n "$ITERM_SESSION_ID" ]]; then | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" |
| ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |
| #!/bin/bash | |
| # This is the 'mover' script used for moving files from the cache disk to the | |
| # main array. It is typically invoked via cron. | |
| # After checking if it's valid for this script to run, we check each of the top-level | |
| # directories (shares) on the cache disk. If, and only if, the 'Use Cache' setting for the | |
| # share is set to "yes", we use 'find' to process the objects (files and directories) of | |
| # that directory, moving them to the array. |
| // Add on element with overflow | |
| -webkit-mask-image: -webkit-radial-gradient(white, black); |
Create a buffer DB inbetween the client and the database server that kept common objects in memory (like the whole page and comments section) allowing fast edits (and appends) and only syncing it all to the DB every X seconds or after the object has fallen off the front page and things have slowed down for it.
A incrementing counter would be needed as we would need to sync stuff before it has a DB id? Or we could get a database ID on first save, but still use the buffer DB until things died back down.
Redis could be the sync store since multiple servers could read-write to it in an ATOMIC / ACID way without problems. You cannot ever prevent race conditions (two people making changes to a comment); only race conditions that clober previous updates (two people saving a comment at the same time resulting in a lost comment).
Each element of the object which needs CRUD support would need to be a new HASH with the ID stored in a SET (except for the root objec
| #!/usr/bin/env node | |
| // Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
| // Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID | |
| // CONFIGURATION ####################################################################################################### | |
| const token = 'SLACK TOKEN'; | |
| // Legacy tokens are no more supported. | |
| // Please create an app or use an existing Slack App |
Here is an updated list of the colors that are currently implemented with a name.
To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.
| Name | Int value | Hex Code |
|---|---|---|
Default |
0 | #000000 |
Aqua |
1752220 | #1ABC9C |
DarkAqua |
1146986 | #11806A |
Green |
5763719 | #57F287 |
DarkGreen |
2067276 | #1F8B4C |