Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
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
#!/bin/sh | |
# Nginx | |
NGINX_LATEST_VER=$(curl -sL https://nginx.org/en/CHANGES | grep 'Changes' | head -n1 | awk '{print $4}') | |
curl --progress-bar -L http://nginx.org/download/nginx-${NGINX_LATEST_VER}.tar.gz | tar xz | |
# PHP | |
PHP_LATEST_VER=$(curl -sL https://www.php.net/releases/feed.php | awk '/entry/,/\/entry/' | tr '\n' ' ' | awk '{ print $3 }') | |
curl --progress-bar -L http://jp2.php.net/get/php-${PHP_LATEST_VER}.tar.xz/from/this/mirror | tar xJ |
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
#!/bin/sh | |
if [ "$(whoami)" != "root" ]; then | |
exit 126 | |
fi |
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
#!/bin/sh | |
echo -n "Default yes [Y/n]: " | |
read y | |
if [[ "${y:0:1}" == [nN] ]]; then | |
echo "Answer no." | |
exit 1 | |
fi |
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
#!/bin/sh | |
abort () { | |
echo "Aborted." | |
exit 1 | |
} | |
echo "Ctrl-D to continue, Ctrl-C to abort." | |
trap abort 2 |
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
Creative Commons Legal Code | |
CC0 1.0 Universal | |
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE | |
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN | |
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS | |
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES | |
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS | |
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM |
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
version: '3.5' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy:alpine | |
restart: always | |
network_mode: host | |
ports: | |
- "443:443" | |
- "80:80" |
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
#!/usr/bin/perl | |
use feature qw(say); | |
use strict; | |
use warnings; | |
use Cwd 'abs_path'; | |
use File::Basename 'dirname'; | |
use File::Spec; | |
use Getopt::Long 'GetOptions'; | |
use JSON::PP; |
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
/* ==UserStyle== | |
@name niconico user page dark theme | |
@namespace kpherox.dev | |
@version 1.2.0 | |
@author kPherox <[email protected]> | |
==/UserStyle== */ | |
@-moz-document url-prefix("https://www.nicovideo.jp/my"), | |
url-prefix("https://www.nicovideo.jp/user"), | |
url-prefix("https://www.nicovideo.jp/series") { | |
body.BaseLayout { |