When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
#!/usr/bin/bash | |
if [[ "$1" =~ ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ ]]; then | |
if [[ $(/usr/sbin/vmadm lookup uuid="$1" -j -o type | /opt/tools/bin/jq '.[][]') = "KVM" ]]; then | |
/usr/sbin/vmadm console "$1" | |
else | |
/usr/sbin/zlogin "$1" | |
fi | |
else | |
uuid=$(/usr/sbin/vmadm lookup alias="$1") | |
brand=$(/usr/sbin/vmadm lookup alias="$1" -j -o type | /opt/tools/bin/jq '.[][]' |sed 's/"//g') |
Adding a new disk to a bhyve vm takes a few steps. | |
1. increase the quota on the zfs dataset to accomodate the additional | |
space. | |
2. create a zvol inside the zone | |
3. stop the vm and update its configuration to reflect the change | |
4. start the vm, login and use the disk | |
# update quota |
use "random" | |
use "collections" | |
class CreationFactory | |
let _desired: String | |
new create(d: String) => | |
_desired = d | |
fun apply(c: String): Creation => |
{ | |
"add_disks": [ | |
{ | |
"media": "disk", | |
"model": "virtio", | |
"nocreate": true, | |
"boot": false, | |
"path": "/dev/zvol/rdsk/tank0/s1node1", | |
"size": 20480 | |
} |
Find it here: https://github.com/bitemyapp/learnhaskell
EStone test completed | |
**** CPU speed UNKNOWN MHz **** | |
**** Total time 1.740884613333333 seconds **** | |
**** ESTONES = 260159.54 **** | |
{'ESTONES',2.601595e+05} | |
Title Millis Estone % Loops | |
list manipulation 52.07 29171.60 7 6400 | |
small messages 391.62 7915.86 10 1515 |
:editor.behaviors [:lt.plugins.auto-complete/auto-show-on-input] | |
:editor.keymap [:lt.plugins.auto-complete/auto-show-on-input] |
-module(bitcask_merge). | |
-export([merge_dirs/0]). | |
bitcask_data_dir() -> | |
bitcask_data_dir(application:get_env(riak_kv, multi_backend), | |
application:get_env(bitcask, data_root)). | |
bitcask_data_dir(undefined, undefined) -> | |
undefined; |
PBStatusFun = fun() -> | |
VnodePids = [Pid || {_, Pid} <- riak_core_vnode_manager:all_index_pid(riak_kv_vnode)], | |
Links = [process_info(Pid, [links]) || Pid <- VnodePids], | |
WorkerPoolPids = [WPPid || [{links,[_, WPPid]}] <- Links], | |
WorkerPoolLinks = [process_info(Pid, [links]) || Pid <- WorkerPoolPids], | |
PoolboyPids = [PoolboyPid || [{links,[_, PoolboyPid]}] <- WorkerPoolLinks], | |
[poolboy:status(Pid) || Pid <- PoolboyPids] | |
end. | |
PBStatusFun = fun(Index) -> |