Skip to content

Instantly share code, notes, and snippets.

- van egy host
- van neki mondjuk 1000 mbit uplinkje
- van benne x db guest (mondjuk 30)
guest-ekből backupot kéne nyomni felfelé (duply)
a probléma az, hogy ha egyszerre kettőnél több backup job fut (két külön guestben) akkor túlzottan megeszi a gépet (I/O-ban)
nem akarjuk a backupot nagyon szétteríteni 23-tól 6-ig jó lenne ha végezne
a backupok hossza kb. megjósolhatatlan
hogyan oldanád meg?
@gabrielke
gabrielke / esp8266_pubsubclient.ino
Created March 11, 2018 07:09 — forked from igrr/esp8266_pubsubclient.ino
PubSubClient sample for ESP8266 Arduino
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
const char* ssid = ".................";
const char* password = "................";
char* topic = "esp8266_arduino_out";
char* server = "iot.eclipse.org";
@gabrielke
gabrielke / apache_cors_example
Created March 20, 2018 14:45 — forked from brianlmoon/apache_cors_example
CORS example for Apache with multiple domains
# Sets CORS headers for request from example1.com and example2.com pages
# for both SSL and non-SSL
SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0
Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN
Header set Access-Control-Allow-Credentials "true" env=ORIGIN
# Always set Vary: Origin when it's possible you may send CORS headers
Header merge Vary Origin
@gabrielke
gabrielke / base64encode.py
Created April 1, 2019 21:29
Python3 base64 encoding sample
import base64
s='abc'
b = s.encode("UTF-8")
e = base64.b64encode(b)
f = e.decode("UTF-8")
print(f)
@gabrielke
gabrielke / cloud-config.txt
Created May 2, 2019 06:51
cloud-init config for swap
#cloud-config
runcmd:
- [touch, /root/cloud-init-started]
- [dd, if=/dev/zero, of=/swapfile, bs=1M, count=2048 ]
- [chmod, "0600", /swapfile]
- [mkswap, /swapfile]
- [swapon, /swapfile]
- [touch, /root/cloud-init-finished]
#cloud-config
package_update: true
package_upgrade: true
swap:
filename: /swapfile
size: "2147483648"
@gabrielke
gabrielke / CalculatorTest1.groovy
Last active July 31, 2019 16:47
Winium extended testcase (calculator)
import org.openqa.selenium.By as By
import org.openqa.selenium.winium.DesktopOptions as DesktopOptions
import org.openqa.selenium.winium.WiniumDriver as WiniumDriver
import com.kms.katalon.core.logging.KeywordLogger
WiniumDriver driver = null
KeywordLogger log = new KeywordLogger()
String appPath = 'C:/windows/system32/calc.exe'
DesktopOptions option = new DesktopOptions()
docker volume create awstats-db
d1.sh:
docker run -e LOG_FORMAT="%host %other %other %time1 %methodurl %code %bytesd" --rm -v /Users/gabrielakos/workspace/alfa/awstats/logs:/web-logs:ro -v awstats-db:/var/lib/awstats openmicroscopy/awstats /web-logs/access_*
d2.sh:
docker run --rm -p 8080:8080 -v awstats-db:/var/lib/awstats openmicroscopy/awstats httpd
@gabrielke
gabrielke / browsers.json
Last active September 28, 2019 22:32
Basic selenoid install with docker-compose
{
"chrome": {
"default": "77.0",
"versions": {
"76.0": {
"image": "selenoid/chrome:76.0",
"port": "4444",
"path": "/"
},
"77.0": {
@gabrielke
gabrielke / 10periodic
Created January 3, 2020 09:40
ubuntu unattended upgrade 10periodic
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";