- 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
server { | |
listen 80; | |
server_name example.com www.example.com; | |
if ($http_x_forwarded_proto = "http") { | |
return 301 https://$server_name$request_uri; | |
} | |
... directives to generate a response | |
} |
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
13.32.0.0/15 | |
13.52.0.0/16 | |
13.54.0.0/15 | |
13.56.0.0/16 | |
13.57.0.0/16 | |
13.58.0.0/15 | |
13.112.0.0/14 | |
13.124.0.0/16 | |
13.125.0.0/16 | |
13.126.0.0/15 |
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 | |
class OnePayGateway | |
{ | |
private $options = [ | |
'version' => '2', | |
'currency' => 'VND', | |
'merchant' => 'ONEPAY', | |
'access_code' => 'D67342C2', | |
'secure_hash' => 'A3EFDFABA8653DF2342E8DAC29B51AF0', |
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
#!/bin/bash | |
# Disable IPv6 | |
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf | |
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf | |
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf | |
sudo sysctl -p | |
# Firewall | |
sudo sed -i -e 's/IPV6=yes/IPV6=no/' /etc/default/ufw |
Replace A1
with your cell
Beatiful version
=IF(
MID(A1,2,1)="9",
IF(
OR(MID(A1,3,1)="6",MID(A1,3,1)="7",MID(A1,3,1)="8"),
"VIETTEL",
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(), |
NewerOlder