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
# dnf install gcc | |
# dnf install redhat-rpm-config | |
# dnf install python2-devel.aarch64 | |
# dnf install python3-virtualenv | |
$ mkdir -p venv && cd venv | |
$ virtualenv -p /usr/bin/python2.7 octoprint && source ./octoprint/bin/activate | |
(octoprint)$ pip install octoprint | |
(octoprint)$ octoprint/bin/octoprint serve --host=<ip> |
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/sh | |
# Check end date certificate | |
# Using: script.sh example.net | |
DOMAIN=$1 | |
CERT_DOWNLOAD_PATH=/tmp | |
PORT=443 | |
ALERT_TIME=604800 # 7 days |
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
Прописываем настройки в файл: | |
# ~/.ssh/config | |
Host MyHost | |
HostName [host-ip] | |
Port [host-port] | |
User [host user, usually root] | |
IdentityFile [path/to/your/ID_RSA, usually ~/.SSH/ID_RSA] | |
Далее запускаем: |
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 verify_app_store_in_app($receipt, $is_sandbox) | |
{ | |
//$sandbox should be TRUE if you want to test against itunes sandbox servers | |
if ($is_sandbox) | |
$verify_host = "ssl://sandbox.itunes.apple.com"; | |
else | |
$verify_host = "ssl://buy.itunes.apple.com"; | |
$json='{"receipt-data" : "'.$receipt.'" }'; | |
//opening socket to itunes |
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
# Check voip scanners and block access for that | |
# | |
# | |
# | |
*filter | |
:SIP-BORDER-CONTROLLER - [0:0] | |
# other rules |
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 sec2humanReadable(duration){ | |
var hour = 0; | |
var min = 0; | |
var sec = 0; | |
if (duration){ | |
if (duration >= 60){ | |
min = Math.floor(duration / 60); | |
sec = duration % 60; | |
} |
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
#!/usr/bin/env python | |
import os | |
from BaseHTTPServer import HTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
ROUTES = [ | |
('/', '/var/www/doc-html') | |
] | |
class MyHandler(SimpleHTTPRequestHandler): |