Testovano na:
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie
DROP TABLE IF EXISTS test; | |
CREATE TABLE test ( | |
id int(11) NOT NULL AUTO_INCREMENT, | |
uptime bigint NOT NULL, | |
PRIMARY KEY (id) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; | |
DELIMITER $$ |
martin@martin:/tmp$ vim soucet.pyx | |
martin@martin:/tmp$ cython --embed soucet.pyx | |
martin@martin:/tmp$ gcc soucet.c -I/usr/include/python2.7 -lpython2.7 -o soucet | |
martin@martin:/tmp$ strip soucet | |
martin@martin:/tmp$ ls -lh | grep soucet | |
-rwxrwxr-x 1 martin martin 23K dub 7 10:07 soucet | |
-rw-rw-r-- 1 martin martin 89K dub 7 10:07 soucet.c | |
-rw-rw-r-- 1 martin martin 180 dub 7 10:06 soucet.pyx | |
martin@martin:/tmp$ | |
martin@martin:/tmp$ ./soucet 5 10 |
#!/bin/bash | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
echo 1 > /proc/sys/net/ipv4/ip_forward |
#!/bin/sh | |
host=10.123.1.1 | |
port=80 | |
ubnt_ifstats=`ubntbox ifstats.cgi` | |
# nesmi obsahovat binarni data!!! | |
( | |
echo open |
root@martin:~# fdisk -l /dev/sdb | |
Disk /dev/sdb: 14.5 GiB, 15523119104 bytes, 30318592 sectors | |
Units: sectors of 1 * 512 = 512 bytes | |
Sector size (logical/physical): 512 bytes / 512 bytes | |
I/O size (minimum/optimal): 512 bytes / 512 bytes | |
Disklabel type: dos | |
Disk identifier: 0x9ed9cab6 | |
Device Boot Start End Sectors Size Id Type | |
/dev/sdb1 * 2048 133119 131072 64M c W95 FAT32 (LBA) |
// Kompilace: gcc -o test test.c | |
#include <stdio.h> | |
#include <string.h> | |
int main(void) { | |
int i; | |
char nazev[] = "test_"; | |
for (i = 0; i < 5; i++) { | |
[Enable suspend and hibernate] | |
Identity=unix-user:* | |
#Identity=unix-user:martin | |
#Identity=unix-user:martin;unix-group:admin | |
Action=org.freedesktop.upower.hibernate | |
ResultInactive=no | |
ResultActive=yes | |
AllowAny=yes | |
# /etc/polkit-1/localauthority/50-local.d/allow_all_users_to_upower.pkla |