Skip to content

Instantly share code, notes, and snippets.

Avatar

Irek Romaniuk irom77

  • Self
  • United States
View GitHub Profile
@irom77
irom77 / api_backends.conf
Created Oct 17, 2021 — forked from nginx-gists/api_backends.conf
Deploying NGINX Plus as an API Gateway, Part 1
View api_backends.conf
upstream warehouse_inventory {
zone inventory_service 64k;
server 10.0.0.1:80;
server 10.0.0.2:80;
server 10.0.0.3:80;
}
upstream warehouse_pricing {
zone pricing_service 64k;
server 10.0.0.7:80;
@irom77
irom77 / pysyslog.py
Created Dec 10, 2018 — forked from marcelom/pysyslog.py
Tiny Python Syslog Server
View pysyslog.py
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'
@irom77
irom77 / th_pinger.py
Last active Dec 1, 2020 — forked from sourceperl/th_pinger.py
Python script for do multi-threaded ping
View th_pinger.py
#!/usr/bin/env python
# ping a list of host with threads for increase speed
# use standard linux /bin/ping utility
from threading import Thread
import subprocess
import Queue
import re
# some global vars
@irom77
irom77 / ubuntu-lxc-server
Created Jul 25, 2017
Geth/ubuntu-lxc-server/v1.6.7-stable-ab5646c5/linux-amd64/go1.8.1
View ubuntu-lxc-server
0xff5bb228c07deecffe6f895fa3980aae23c80cae
@irom77
irom77 / ubuntu-lxc-server
Created Jul 25, 2017
Geth/ubuntu-lxc-server/v1.6.7-stable-ab5646c5/linux-amd64/go1.8.1
View ubuntu-lxc-server
0xff5bb228c07deecffe6f895fa3980aae23c80cae
View TCP Check
package main
import (
"log"
"net"
)
func main() {
var status string
conn, err := net.Dial("tcp", "127.0.0.1:80")
@irom77
irom77 / speedtest_tester.sh
Created Mar 27, 2016 — forked from shadone/speedtest_tester.sh
Send speedtest.net results to influxdb
View speedtest_tester.sh
#!/bin/bash
INFLUXDB_HOST="localhost"
INFLUXDB_PORT="8086"
DATABASE="home"
[ -f /etc/default/speedtest_tester ] && . /etc/default/speedtest_tester
while [[ $# > 0 ]]; do
key="$1"
@irom77
irom77 / gist:7fe38236b661af8159aa
Created Dec 11, 2015 — forked from dberesford/gist:28876b39d26b02b7683a
Sample node.js leak detection using memwatch and heapdump
View gist:7fe38236b661af8159aa
var http = require('http');
var util = require('util');
var heapdump = require('heapdump');
var memwatch = require('memwatch');
var server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
for (var i=0; i<1000; i++) {
server.on('request', function leakyfunc() {
@irom77
irom77 / redis-install.sh
Last active Aug 27, 2015 — forked from skyrocknroll/redis-install.sh
redis installation fedora redhat centos yum ami amazon
View redis-install.sh
#!/bin/bash
# From here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# Based on: https://github.com/saxenap/install-redis-amazon-linux-centos
# Thanks to https://raw.github.com/gist/2776679/b4f5f5ff85bddfa9e07664de4e8ccf0e115e7b83/install-redis.sh
# Uses redis-server init script from https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server
###############################################
# To use:
## wget https://raw.github.com/jorgerc/install-redis-amazon-linux-centos/master/redis-install-script.sh
## chmod 777 redis-install-script.sh
## ./redis-install-script.sh
@irom77
irom77 / static_server.js
Last active Aug 29, 2015 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
View static_server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);