View pyinstaller
martin@martin /tmp/py $ pyinstaller test.py
21 INFO: PyInstaller: 3.2.1
21 INFO: Python: 2.7.12
21 INFO: Platform: Linux-4.4.0-47-generic-x86_64-with-LinuxMint-18-sarah
21 INFO: wrote /tmp/py/test.spec
25 INFO: UPX is not available.
26 INFO: Extending PYTHONPATH with paths
['/tmp/py', '/tmp/py']
26 INFO: checking Analysis
27 INFO: Building Analysis because out00-Analysis.toc is non existent
View py2exe.py
C:\Tutorial>python setup.py py2exe
View zabbix update trigger
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#1)} >=
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#5)} >=
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#10)} >=
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#15)} >=
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#20)} >=
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#25)} >=
{APP Linux Debian Ubuntu update check:system.run[export LANG=C; sudo apt-get -su upgrade | grep 'newly installed' | cut -d' ' -f1].last(#30)}
and
{APP Linu
View sablona_slovnik.py
message = """
User: {u},
mail: {mail},
agsdgsdng nsgoa sdgnadosfdhfh
"""
print message
d = {'u': "12345",
'mail': "user@exmaple.net",
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)
{