Skip to content

Instantly share code, notes, and snippets.

View drscream's full-sized avatar
🕶️
Focusing

Thomas Merkel drscream

🕶️
Focusing
View GitHub Profile
  1. If needed generate self-signed ssl certificate for nginx (if your config need ssl now):
# Folder need to exists and *.crt and *.key file is used in nginx.conf
$ mkdir -p /opt/local/etc/nginx/ssl
$ /opt/core/bin/ssl-selfsigned.sh -d /opt/local/etc/nginx/ssl -f nginx
  1. Add web information for let's encrypt to nginx into server { ... } content:
static const char colors[NUMCOLORS][ColLast][13] = {
{ "#286e75", "#286e75", "#002b36" }, /* [0] 01 - Client normal */
...
}
static const char *colors[][17] = {
[0] = { "#928374", "#282828", "#282828" },
...
}
{
"brand": "joyent",
"resolvers": ["8.8.8.8", "8.8.4.4"],
"ram": 2048,
"nics": [{
"nic_tag": "switch0",
"ips": [ "192.168.200.200/24" ],
"gateways": [ "192.168.200.1" ],
"primary": true
}]
.required label:after {
color: #e32;
content: ' *';
display:inline;
}
awk -v pat='zonename|create_timestamp|billing_id|owner_uuid|mac|uuid|zone_state|zonepath|zoneid|last_modified|server_uuid|datacenter_name|state|boot_timestamp|pid|zfs_root_recsize|zfs_filesystem|zpool|zfs_data_recsize' '$0~pat {n=2}; n {n--; next}; 1' x.json
# /etc/inet/ndpd.conf
# Send router advertisements not on all interfaces
ifdefault AdvSendAdvertisements 0
ifdefault StatelessAddrConf 0
ifdefault StatefulAddrConf 0
prefixdefault AdvOnLinkFlag on AdvAutonomousFlag on
# local prefix using the default lifetimes
if net1 AdvSendAdvertisements 1
prefix 2a01:138:a015:14::/64 net1
{
"variables": {
"ssh_username": "root",
"ssh_password": "vagrant",
"variant": "minimal",
"box_ver": "7.1.20171229",
"vagrant_username": "vagrant",
"vagrant_password": "vagrant",
"vagrant_group": "vagrant",
"num_cpus": "2",
openvpn_enable="YES"
openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"
openvpn_if="tap"
#!/usr/bin/env bash
# Set basedir and default config file
SSH_HOSTS='/var/ssh'
# Update mdata information from SSH host keys
for key in dsa_key dsa_key.pub rsa_key rsa_key.pub ecdsa_key ecdsa_key.pub ed25519_key ed25519_key.pub; do
cat ${SSH_HOSTS}/ssh_host_${key} |\
mdata-put ssh_host_${key}
done
@drscream
drscream / dz-dev-build.sh
Created September 8, 2017 13:53
Ugly 1 minute workaround
#!/usr/bin/env
# Minimal wrapper script for dev releases in deploy-zone
last=$(git log --format="%h" -n 1)
if [[ -e manifest.json ]]; then
cp manifest.json manifest.json.bak
jq '.version = .version + "-'$last'"' manifest.json.bak > manifest.json
dz build
mv manifest.json.bak manifest.json