This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux | |
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz | |
cp -nv ~/.ssh/id_rsa.pub . | |
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# D-I config version 2.0 | |
# search path for the c32 support libraries (libcom32, libutil etc.) | |
path | |
include menu.cfg | |
default vesamenu.c32 | |
prompt 0 | |
timeout 1 | |
ui gfxboot bootlogo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Use the existing testflinger-agent production folder | |
# to duplicate one more testflinger-agent for desktop SRU | |
# | |
set +x | |
# target CID | |
target_cid=$1 | |
# remove dash from the CID | |
# juju does not accept dash as a agent name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Convert TTC font to TTF using fontforge with python extension. | |
**Warning** The scripts saves splitted fonts in the current working directory. | |
Usage: | |
split_ttc_font_to_ttf.py Droid.ttc | |
Preinstallation: apt-get install python-fontforge | |
""" | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from matplotlib.font_manager import FontManager | |
import subprocess | |
fm = FontManager() | |
mat_fonts = set(f.name for f in fm.ttflist) | |
output = subprocess.check_output( | |
'fc-list :lang=zh -f "%{family}\n"', shell=True) | |
output = output.decode('utf-8') | |
zh_fonts = set(f.split(',', 1)[0] for f in output.split('\n')) | |
available = mat_fonts & zh_fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Usage: | |
# ./this-script <your-submission-json> [your-output-csv] | |
# | |
# | |
import csv | |
import sys | |
import json | |
import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyright 2018 Canonical Ltd. | |
# Written by: | |
# Taihsiang Ho <[email protected]> | |
# | |
# Original source written by Sylvain Pineau <[email protected]>: | |
# https://git.launchpad.net/plainbox-provider-sru/tree/bin/screenshot_validation | |
# | |
# opencv-python >= 3.4.2.17 | |
# |
You can deploy a node with the maas cli which is often preferable to clicking a button on a web UI.
$ SYSTEM_ID=node-787b19d8-d25c-11e4-9f9e-00163eca91de
$ NAME="random-nodename"
$ MAASNAME="maaslocal"
$ maas $MAASNAME machine allocate "name=$NAME"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# cat /proc/cmdline | |
# | |
# to know the content of the option cloud-config-url to get preseed by curl | |
# and then fill in the following variables | |
# | |
# Finally, use the output in the following command: | |
# curl -H '<output>' <endpoint> | |
# |