Local ISOs:
xe sr-create name-label="iso" type=iso device-config:location=/mnt/zfs/iso device-config:legacy_mode=true content-type=iso
#!/bin/env/python | |
# -*- encoding: utf8 -*- | |
# Move files based on file list in a md5 checksum file | |
# (c) Pekka Järvinen 2017- | |
import logging | |
log = logging.getLogger(__name__) | |
import os |
#!/bin/env/python | |
# -*- encoding: utf8 -*- | |
# | |
# Move files based on directory match list | |
# | |
# Example: | |
# /sorted directory has following directories: | |
# - foo | |
# - bar | |
# |
takeown /f "$path" | |
icacls "$file" /grant administrators:F |
Local ISOs:
xe sr-create name-label="iso" type=iso device-config:location=/mnt/zfs/iso device-config:legacy_mode=true content-type=iso
# Maintainer: Pekka Järvinen | |
# FreeBSD's pkg git (source) version | |
# Intended use is for building FreeBSD binary packages on Arch Linux with: | |
# % pkg create --format txz --root-dir $(PWD) --manifest manifest.sh | |
pkgname=freebsd-pkg-git | |
pkgver=1 | |
pkgrel=1 | |
pkgdesc="FreeBSD pkg from source (for building FreeBSD packages on Linux)" | |
url="https://github.com/freebsd/pkg" |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"strings" | |
) | |
func main() { | |
b, _ := ioutil.ReadFile(`/proc/sys/kernel/random/uuid`) |
#!/usr/bin/env python3 | |
# IP address range to CIDR | |
import sys | |
import ipaddress | |
if (len(sys.argv) - 1) != 2: | |
print("Usage: ") | |
print(f" {sys.argv[0]} <ip address> <ip address>") | |
print("Example: ") | |
print(f" {sys.argv[0]} 192.168.0.0 192.168.0.255") |
#!/bin/bash -e | |
# generate file list | |
echo -e "" > files.txt | |
find ../application -type f \( -iname "*.php" -or -iname "*.phtml" \) -exec readlink -f "{}" \; > files.txt | |
# scan files | |
xgettext --force-po --add-comments --from-code=UTF-8 --language=php --package-name=app --package-version=1.0 --msgid-bugs-address=noreply@example.com -o base.pot -f files.txt | |
# base pot -> <lang>.po update |
<?php | |
/* | |
Usage: | |
$ php dump.php "SELECT * FROM mytable" > mytable.json | |
*/ | |
error_reporting(E_ALL | E_STRICT); | |
ini_set('display_startup_errors', 1); | |
ini_set('display_errors', 1); |
#!/bin/bash | |
set -eu | |
set -o pipefail | |
DEST=127.0.0.1 | |
# this adjusts the latency in the receiver | |
LATENCY=0 | |
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" |