How to Delete a File Whose Name Starts with -- (Hyphens)
How to remove things like --filename
Installing Ripgrep on Mac, CentOS and Debian
Installing ripgrep
Upgrading Debian 9 Stretch to Debian 10 Buster
Major and minor upgrade steps from Debian 9 to Debian 10
Show Invisible Characters in Vim
Show whitespace and tabs while editing in Vim
Once you get used to Python layout and Markdown, there are times you want Vim to visualize blank lines and tabs.
Show them temporarily in Vim
: set list
: set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%,space:_Show them permanently
Add the following to ~/.vimrc
set list
set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%,space:_Turn the display back off
Inside Vim,
:set nolistReference
[Changing listchars colors for tabs, spaces, newlines, and so on in Vim (in Japanese)] (https://qiita.com/pollenjp/items/459a08a2cc59485fa08b )
| Item | Description |
|---|---|
| set list | Show invisible characters |
| set listchars | Configure which characters to use |
| tab | Show tab characters |
| trail | Show trailing spaces |
| eol | Show newlines |
| space | Show spaces |
Things to Decide First When You Start a Hugo Site
Items worth deciding before you build a site with Hugo
How to Make Hugo Output .html URLs with uglyURLs
How do you make the site output .html?
How to Write Tables in Markdown
Basic table creation with Markdown
wp-tegaki Plugin Error on WordPress
Disabled wp-tegaki still throws a PHP parse error
Does the wp-tegaki plugin error even when it is disabled?
On a WordPress blog, the following error appeared even though the wp-tegaki plugin I used to run was already disabled. (wp-tegaki is no longer maintained and does not support PHP 7.x)
PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/html//wp-content/plugins/wp-tegaki/wp-tegaki-img.php on line 24
I was not using it anyway and it was annoying, so I deleted it.
These days it is better to use web fonts anyway.
Preventing Copy and Paste of Posts in Beautifulhugo
Applying copy-and-paste protection
Preventing copy and paste of posts
Referring to “テキストのドラッグ、画像のコピーを禁止して、記事をコピーさせない方法 ” (in Japanese), I disable text selection (dragging)
Note that this is applied for the Beautifulhugo theme, so adapt it as appropriate for other themes.
Adding the script
Add this inside the body tag
- beautifulhugo/layouts/_default/baseof.html
<body onMouseDown="return false;" onSelectStart="return false">Fixing the CSS
Add this to the css for body
- beautifulhugo/static/css/main.css
user-select:none;
-webkit-user-select:none;
-ms-user-select: none;
-moz-user-select:none;
-khtml-user-select:none;
-webkit-user-drag:none;
-khtml-user-drag:none;The point
In short, all you need to do is write the Javascript inside the body tag and apply the CSS to body in the CSS