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
Install-Package boost | |
Install-Package boost_date_time-vc143 | |
Install-Package boost_filesystem-vc143 | |
Install-Package boost_log-vc143 | |
Install-Package boost_system-vc143 | |
Install-Package boost_thread-vc143 | |
Install-Package boost_log_setup-vc143 | |
Install-Package boost_chrono-vc143 | |
Install-Package boost_atomic-vc143 |
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
#include <time.h> | |
#include <sys/time.h> | |
void setup() { | |
Serial.begin(115200); | |
delay(5000); | |
struct timeval tv; | |
tv.tv_sec = 1611198855; | |
tv.tv_usec = 0; |
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
@echo off | |
:: Define the name and value of the environment variable | |
set "MY_VARIABLE=MY_VALUE" | |
:: Set the environment variable using setx | |
setx MY_VARIABLE "%MY_VARIABLE%" | |
:: Display a message indicating that the variable has been set | |
echo Environment variable MY_VARIABLE set to %MY_VARIABLE% |
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
#include <iostream> | |
#include <string> | |
#include <curl/curl.h> | |
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) | |
{ | |
((std::string*)userp)->append((char*)contents, size * nmemb); | |
return size * nmemb; | |
} |
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
# dynamic_default_configuration | |
# server block for http and redirect to https nginx proxy | |
server { | |
root /var/www/html; | |
# Add index.php to the list if you are using PHP | |
index index.html index.htm index.nginx-debian.html; | |
server_name SUBDOMAIN_NAME.DOMAIN_NAME; # managed by Certbot |
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
import json | |
import boto3 | |
def lambda_handler(event, context): | |
page_name = event['queryStringParameters']['page'] | |
page_start_time = event['queryStringParameters']['starttime'] | |
print(page_name) | |
print(page_start_time) | |
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
import json | |
import boto3 | |
def lambda_handler(event, context): | |
page_name = event['queryStringParameters']['page'] | |
cover_name = event['queryStringParameters']['cover'] | |
print(page_name) | |
ssm_client = boto3.client('ssm') |
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
import json | |
import boto3 | |
import random | |
from botocore.vendored import requests | |
def random_url(plen=10, ucfirst=True, spchar=True): | |
if plen >= 6 and plen % 2 != 0: | |
plen = plen+1 | |
elif plen < 8: | |
return None, 'length too small' |
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> | |
<!-- Required meta tags --> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<!-- Bootstrap CSS --> | |
<link | |
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" |
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
# pip install onvif-zeep | |
# import package | |
import requests | |
from onvif import ONVIFCamera | |
# create onvif camera object | |
cam_obj = ONVIFCamera(CAMERA_HOST, CAMERA_PORT, CAMERA_USER, CAMERA_PASS) | |
# create media service |
NewerOlder