-
Create liveusb using Ubuntu mini.iso
dd bs=4M if=/home/user/Downloads/mini.iso of=/dev/sdf status=progress; and sync
in fish shell -
During install will be prompted for what to install: choose xubuntu minimal and openssh server
-
This time left just one disk (8TB) in the case, and used LVM when partitioning: root given 15gb, data partition given the rest (set recovery-blocks to 1% and inode to largest size since this is just a media partition)
- references: https://wiki.archlinux.org/index.php/GnuPG
~/.gnupg/gpg.conf
use SHA512 over default SHA256
personal-digest-preferences SHA512
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES
- Last tested version: 5.7.20
- Make sure LXC has more than 12GB, otherwise Unifi fails to start!
# for unifi
echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
This file contains 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
# -*- coding: utf-8 -*- | |
''' Generates database schema graph from a relational database. | |
Usages: | |
Add database configuation in this file and then | |
python app.py | |
Note: You must have your latest database schema in the database | |
engine you are running against. | |
''' | |
from __future__ import unicode_literals, absolute_import |
This file contains 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
set DEAD " "; set LIVE "🌱"; set wid 21; set hei 21 | |
for cell in b(seq 2)r(seq $hei)c(seq $wid); set -g $cell $DEAD; end | |
set -g flip 1; set -g flop 2 | |
function show_board | |
for row in (seq $hei); for col in (seq $wid); set -l cell b{$flip}r{$row}c{$col}; echo -n $$cell | |
end; echo; end; end | |
set b1r10c10 $LIVE; set b1r10c11 $LIVE; set b1r10c12 $LIVE; | |
set b1r11c10 $LIVE; set b1r11c12 $LIVE; | |
set b1r12c10 $LIVE; set b1r12c11 $LIVE; set b1r12c12 $LIVE; | |
while true |
This file contains 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
import gevent | |
import gevent.monkey | |
gevent.monkey.patch_all() | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask | |
app = Flask(__name__) | |
app.debug = True |
iBusはD-Busを通信プロトコルに使用しているため、外からもD-Busで制御することが出来る。 しかしながら、D-Busが一般に使用するSystem Bus と Session Busとは違うBusを使用するため、ちょっと注意が必要になる。
iBus1.5からはデスクトップ環境に統合されることを前提に変更されているため、ここではその変更前のバージョンを対象とする。
iBusのD-Busに接続するための接続するには IBUS_ADDRESSが必要になる。IBUS_ADDRESSは通常 iBusを起動しているユーザーの
This file contains 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
import pytz | |
class MyView(MyModelView): | |
# Display the time in user's local timezone on the List View | |
column_formatters = | |
dict(scheduledtime=lambda v,c,m,p: m.scheduledtime.replace(tzinfo=pytz.utc).astimezone(tz=pytz.timezone(config.LOCAL_TIMEZONE))) | |
# Display the time in user's timezone on the Edit View | |
def edit_form(self, obj): | |
form = self._edit_form_class(get_form_data(), obj=obj) |
This file contains 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 | |
# startx | |
# Alternative, simpler startx which makes use of the XDG specification | |
# - assumes dbus is already running | |
[[ -n "$DISPLAY" ]] && exit 0 | |
[[ -z "$XDG_VTNR" ]] && exit 1 | |
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} | |
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} |
This file contains 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
function _common_section | |
printf $c1 | |
printf $argv[1] | |
printf $c0 | |
printf ":" | |
printf $c2 | |
printf $argv[2] | |
printf $argv[3] | |
printf $c0 | |
printf ", " |
OlderNewer