View rs232.cs
// zdroj: http://xanthium.in/Serial-Programming-using-Csharp-on-Windows
using System;
using System.IO.Ports;
namespace SerialPort_Tutorial
{
class SerialPort_Write
{
static void Main(string[] args)
View ansible.md

ROLE:

- name: Test-only certificate
  debug:
    msg: "{{ letsencrypt_test_only_certificate | ternary('--test','') }} "

host_vars: letsencrypt_test_only_certificate: true :

View dnsquery.py
try:
import socket
import dns.resolver
import argparse
parser = argparse.ArgumentParser(description='dns query')
parser.add_argument('--server', action="store", type=str, required=False, dest='server', help='DNS server (default 8.8.8.8)', default='8.8.8.8')
parser.add_argument('--record', action="store", type=str, required=True, help='record type to find', dest='record')
parser.add_argument('--find', action="store", type=str, required=True, dest='find', help='')
results = parser.parse_args()
View usb_nabijecka.ino
#define USB1_SW 2
#define USB2_SW 3
#define USB1_HALL 8
#define USB2_HALL 9
unsigned long previousMillis = 0;
const long interval = 500;
void setup() {
View firewall.sh
#echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -X
#smaze vsechna pravidla
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
#politika firewallu
View funguje.php
<?php
function apache_vhosts($binary='sudo /usr/sbin/apache2ctl')
{
$command = " -S 2>&1 | grep 'port ' | awk {'print $2,$4'} | sort -u -t' ' -k2,2 | grep -v 'localhost'";
$vhosts = shell_exec(sprintf("%s %s", $binary, $command));
$vhosts = explode("\n", trim($vhosts));
$results = array();
foreach($vhosts as $vhost)
{
View server.py
import socket
import sys
from thread import *
HOST = '' # Symbolic name meaning all available interfaces
PORT = 2196 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print 'Socket created'
View funkce_vice_navratovych_hodnot.py
def wtf(a, b):
plus = a + b
minus = a - b
return plus, minus
x, y = wtf(10, 5)
print x
print y
View arduino_wifi_rele.ino
#include <ESP8266WiFi.h>
#define RELAY_PIN 5
const char* ssid = "SSID";
const char* password = "pass...123";
bool relay_status = false;
// Create an instance of the server
View output.txt
/usr/bin/python3.5 /home/martin/PycharmProjects/JavaScript/miniracer_test1.py
2
89
:-)
Timed out!
Process finished with exit code 0