- https://vsupalov.com/articles/ : #docker
This file contains 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
Keybinding | Action | Tag | |
---|---|---|---|
Ctrl+X | Cut line (empty selection) | basic-editing | |
Ctrl+C | Copy line (empty selection) | basic-editing | |
Alt+ ↓ / ↑ | Move line down/up | basic-editing | |
Ctrl+Shift+K | Delete line | basic-editing | |
Ctrl+Enter | Insert line below | basic-editing | |
Ctrl+Shift+Enter | Insert line above | basic-editing | |
Ctrl+Shift+\ | Jump to matching bracket | basic-editing | |
Home | Go to beginning | basic-editing | |
End | Go to end of line | basic-editing |
This file contains 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
Calc size of root directories | |
```bash | |
du -h . --max-depth=1 | sort -n -r | head -n 10 | |
``` |
This file contains 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() { | |
const params = new URLSearchParams(window.location.search); | |
const utm_params = []; | |
params.forEach(function(value, key) { | |
if (key.startsWith('utm_')) { | |
utm_params.push(key+'='+value) | |
} | |
}) | |
utm_search = utm_params.join('&'); | |
if (!!utm_search) { |
This file contains 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
<?php | |
// https://github.com/madnh/hanhchinhvn/tree/master/dist | |
$result = []; | |
$data = json_decode(file_get_contents('tree.json'), true); | |
foreach ($data as $a => $province) { | |
$p = []; | |
foreach ($province['quan-huyen'] as $b => $district) { | |
$d = []; | |
foreach ($district['xa-phuong'] as $c => $ward) { |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<script> | |
var setTempCookie = function (name, value) { | |
var now = new Date(), |
This file contains 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
sudo add-apt-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install php7.1-bz2 php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-fpm php7.1-gd php7.1-imap php7.1-intl php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-opcache php7.1-readline php7.1-soap php7.1-sqlite3 php7.1-xml php7.1-xmlrpc php7.1-xsl php7.1-zip |
Encrypt
openssl enc -aes-256-cbc -in [input] -out [output]
Decrypt
openssl enc -aes-256-cbc -d -in [input] > [output]
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 9.
This file contains 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
ESC,normal mode | |
`,[motion] go to mark point | |
~,[command] toggle case | |
!,[operator] external filter | |
@,[command] play a macro | |
#,[motion] previous indent | |
$,[motion] end of line | |
%,[motion] go to match open/close symbol | |
^,[motion] "soft" begin of line - first char not blank space | |
&,[command] repeat :s (:s search and replace in current line) |
NewerOlder