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
{ | |
"brand": "bhyve", | |
"vcpus": "2", | |
"ram": "16384", | |
"alias": "centos-bhyve1", | |
"hostname": "centos-bhyve1", | |
"dns_domain": "example.com", | |
"resolvers": ["8.8.8.8", "8.8.4.4"], | |
"disks": [ | |
{ |
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
[root@macktron ~]# uname -a | |
SunOS macktron 5.11 joyent_20180830T001556Z i86pc i386 i86pc | |
[root@macktron ~]# cat /etc/issue | |
*--+--*--* | |
|\ |\ |\ |\ J O Y E N T | |
| \| \| \| \ ##### #### # ##### ### # # TM | |
+--*--+--*--* # # # # # # # ## # |
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
] | |
{ | |
"nic_tag": "admin", | |
"ip": "172.22.1.3", | |
"netmask": "255.255.248.0", | |
"gateway": "172.22.0.253" | |
}, | |
{ | |
"nic_tag": "admin", | |
"ip": "172.22.18.252", |
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
[root@f292b233-6a5b-e858-898a-85d89db534c5 ~]# ministat -c 99.5 -s -w 60 | |
trial.1 trial.2 | |
x trial.1 | |
+ trial.2 | |
+------------------------------------------------------------+ | |
|x +| | |
|x +| | |
|x +| | |
|x +| | |
|x +| |
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
# sm-summary fails with an error using the latest 2018-04-08 smartos-image | |
# error is: | |
[root@6e08a13d-1eb6-c5d6-c2ee-fea3793af583 ~]# sm-summary | |
* Gathering VM instance summary.. | |
df: unknown option: B | |
Usage: df [-F FSType] [-abeghklmntPVvZ] [-o FSType-specific_options] [directory | block_device | resource] | |
[root@6e08a13d-1eb6-c5d6-c2ee-fea3793af583 ~]# grep df `which sm-summary` | |
vm_tmpused=$(df -B1 /tmp | awk '{ if ($1 ~ /swap/) printf("%d", $3/1024/1024) }'); |
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
SunOS Release 5.11 Version joyent_20180607T005809Z 64-bit | |
Copyright (c) 2010-2018, Joyent Inc. All rights reserved. | |
2018-06-13T23:39:3.394554+00:00 macktron rsyslogd3: No files configured to be monitored [try http://www.rsyslog.com/e/-3 ] | |
2018-06-13T23:39:31.397858+00:00 macktron genunix: [ID 540533 kern.notice] #015SunOS Release 5.11 Version joyent_20180607T005809Z 64-bit | |
2018-06-13T23:39:31.397864+00:00 macktron genunix: [ID 265948 kern.notice] Copyright (c) 2010-2018, Joyent Inc. All rights reserved. | |
2018-06-13T23:39:31.398046+00:00 macktron acpica: [ID 717010 kern.notice] ACPI: RSDP 0x00000000000F0490 000024 (v02 SUPERM) | |
2018-06-13T23:39:31.398049+00:00 macktron acpica: [ID 428659 kern.notice] ACPI: XSDT 0x00000000DDA2C0A0 0000C4 (v01 SUPERM SMCI--MB 01072009 AMI 00010013) | |
2018-06-13T23:39:31.398051+00:00 macktron acpica: [ID 940304 kern.notice] ACPI: FACP 0x00000000DDA3B9A0 00010C (v05 SUPERM SMCI--MB 01072009 AMI 00010013) | |
2018-06-13T23:39:31.398054+00:00 macktron acpica: [ID 736406 kern.notice] ACPI: |
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
#!/usr/bin/env bash | |
# Loads and mounts an ISO over SMB via the | |
# SuperMicro IPMI web interface | |
# | |
# usage: supermicro-mount-iso.sh <ipmi-host> <smb-host> <path> | |
# e.g.: supermicro-mount-iso.sh 10.0.0.1 10.0.0.2 '\foo\bar\windows.iso' | |
set -x |
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 | |
# because building llvm/clang docs are bad (based on someone's blog post) | |
# don't forget commonly missed pre-reqs: | |
# - ncurses-devel, libxml2-devel, python, cmake, libedit-devel | |
version=5.0.1 | |
base="llvm" | |
bits="cfe libcxx libcxxabi libunwind lldb clang-tools-extra" | |
echo -n "fetching " | |
for part in ${base} ${bits} ; do |
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
#+BEGIN_SRC emacs-lisp | |
(font-lock-add-keywords 'org-mode | |
'(("^ +\\([-*]\\) " | |
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) | |
#+END_SRC | |
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
use std::path::Path; | |
fn main() { | |
let path = Path::new("./package"); | |
if path.exists() { | |
if path.is_dir() { | |
println!("{:?} is a directory", path); | |
} else { | |
println!("{:?} is not a directory", path); | |
} |