View navod.sh
# Download a rootfs img and a kernel:
sudo apt-get install qemu-user-static qemu-system-arm
wget http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-armhf-disk1.img
wget http://launchpadlibrarian.net/353613547/linux-image-4.4.0-111-generic-lpae_4.4.0-111.134_armhf.deb
# (https://launchpad.net/ubuntu/xenial/armhf/linux-image-4.4.0-111-generic-lpae/4.4.0-111.134)
dpkg -X linux-image-4.4.0-111-generic-lpae_4.4.0-111.134_armhf.deb .
mkdir -p tmp
qemu-img convert xenial-server-cloudimg-armhf-disk1.img xenial-server-cloudimg-armhf.img
sudo kpartx -av xenial-server-cloudimg-armhf.img
sudo mount /dev/mapper/loop0p1 tmp
View gist:694214488f91165f194aeef55f33da78
/home/pokus/.config/chromium/Default/Preferences
"window_placement": {
"bottom": 1080,
"left": 0,
"maximized": true,
"right": 1920,
"top": 0,
"work_area_bottom": 1080,
View gist:855815af78d5331a4e009babc1e476d9
http://paste.debian.net/1005806/
Posting 1005806 from anonymous posted at 2018-01-18 12:13:44 expires: 2018-01-19 12:13:44
# Query the number of packages that can be upgraded. Returns a number.
UserParameter=deb.pkg.upgrades,apt-get -su --assume-no dist-upgrade | grep -oP "^\K([0-9]+)(?= upgraded,)"
# Query the number of packages with security updates that can be upgraded.
# Returns a number.
View apt-history.log.md

manual install/update:

# zcat /var/log/apt/history.log.1.gz 

Start-Date: 2017-12-21  20:07:57
Commandline: apt-get install supervisor
Install: supervisor:amd64 (3.0r1-1+deb8u1), python-meld3:amd64 (1.0.0-1, automatic)
End-Date: 2017-12-21  20:07:59

Start-Date: 2017-12-28  23:18:20
View cmd.sh
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-uboot-3.7.0-armhf.tar.gz
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-minirootfs-3.7.0-armhf.tar.gz
qemu-img create -f raw sd.img 512M
sudo losetup /dev/loop0 sd.img
sudo kpartx -av /dev/loop0
lsblk
sudo mkfs.ext3 /dev/mapper/loop0p1 # *must be ext3, not ext4*
sudo mount -t ext3 /dev/mapper/loop0p1 /mnt
View alpine-qemu-arm.sh
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-uboot-3.7.0-armhf.tar.gz
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-minirootfs-3.7.0-armhf.tar.gz
qemu-img create -f raw sd.img 512M
sudo losetup /dev/loop0 sd.img
sudo kpartx -av /dev/loop0
lsblk
sudo mkfs.ext4 /dev/mapper/loop0p1
mount -t ext4 /dev/mapper/loop0p1 /mnt
View gist:62f5beb6df29431cb5b58ff383bf71a3
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-uboot-3.7.0-armhf.tar.gz
tar xzvf alpine-uboot-3.7.0-armhf.tar.gz
mkdir fat
qemu-system-arm -M virt -m 64 -drive file=fat:fat/ -kernel boot/vmlinuz-hardened -initrd boot/initramfs-hardened -append modules=loop,squashfs,sd-mod,usb-storage
View skript.lua
function vypni(domoticz)
local rele = domoticz.devices('rele')
rele.switchOff().afterMin(3)
domoticz.log("vypinam za xxx minut")
end
function zapni(domoticz)
local rele = domoticz.devices('rele')
rele.switchOn().afterMin(3)
domoticz.log("zapinam za xxx minut")
View arduino_change_baud_rate_in_loop.ino
void setup() {
}
void loop() {
Serial.begin(9600);
Serial.println("$test_9600$\n");
Serial.flush();
Serial.end();
delay(1000);
View index.php
<?php
/*
# visudo
www-data ALL=NOPASSWD: /usr/sbin/etherwake
*/
$password = "MocTajneHeslo";
if ( $_POST["computer"] ) {
if ( $_POST["password"] == $password ) {