Skip to content

Instantly share code, notes, and snippets.

View drscream's full-sized avatar
🕶️
Focusing

Thomas Merkel drscream

🕶️
Focusing
View GitHub Profile
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
alias dz-search='dz list -c | grep -i'
alias zlogin='dz shell '
function alogin() {
UUID=$(cat ~/.dz/vms.json | jq -r '.[][] | select(.alias=="'${1}'") | .uuid')
dz shell ${UUID}
}
{
"brand": "joyent",
"image_uuid": "7bc68970-96b3-11e6-a0e5-db28b1269814",
"autoboot": true,
"delegate_dataset": true,
"resolvers": [
"192.168.25.1" <------------------------------------------ HERE :-)
],
"max_physical_memory": 1024,
"max_swap": 1024,
[root@fluffy (de-muc-ipx) /zones/dcaaf7c8-7b04-42bd-bf61-c12ee3315b6c/cores]# mdb core.in.imapproxyd.90929
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> $c
main+0x2d4()
_start+0x6c()
> $C
fffffd7fffdffc90 main+0x2d4()
fffffd7fffdffca0 _start+0x6c()
> main+0x2d4::dis
main+0x2b2: je +0x83a <main+0xaf2>
0.00997448 MB p5-LWP-UserAgent-Determined-1.07nb2
0.0122776 MB p5-File-Listing-6.04nb5
0.0132637 MB p5-HTTP-Date-6.02nb5
0.0145254 MB p5-LWP-Protocol-https-6.06nb4
0.0158739 MB p5-Encode-Locale-1.05nb2
0.0160151 MB p5-HTML-Tagset-3.20nb8
0.0175686 MB pkgsrc-gnupg-keys-20160519
0.0188379 MB p5-WWW-RobotRules-6.02nb5
0.0194502 MB p5-HTTP-Negotiate-6.01nb5
0.0198689 MB p5-Mojo-IOLoop-ForkCall-0.17nb2
#!/bin/bash
# Thomas Merkel <[email protected]>
# Allow you to show ssl certificate details or show only the PEM
# format.
export PATH=/opt/pkg/bin:${PATH}
show_help() {
echo "${0} [-d|-s] host port starttls"
echo
@drscream
drscream / find-startssl-certs.sh
Last active April 5, 2017 10:44
An simple but maybe ugly script to find StartCom and StartSSL certificates on your system!
#!/usr/bin/env bash
# Thomas Merkel <[email protected]>
# PATH to have gnutools installed
PATH=/opt/local/bin:${PATH}
# Default location to look for certificates (*.pem, *.crt)
crt_locations=${crt_locations-'/opt/local/etc /etc/'}
# Ignore some system CAs and special files which are no certificate files
  1. Install speedtest-cli from pip and be sure pip exists:
$ pkgin in py34-pip
$ pip install speedtest-cli
  1. Configure cronjob to run speedtest-cli every X hours or minutes:
2,42 * * * * /opt/local/bin/speedtest-cli --simple &gt; /tmp/speedtest.tmp &amp;&amp; cat /tmp/speedtest.tmp &gt; /tmp/speedtest.out

## Connect to server

$ USERNAME='[email protected]'
$ SERVER='yoursieveserver'
$ sieve-connect --server ${SERVER} --user ${USERNAME}

Help

@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