Skip to content

Instantly share code, notes, and snippets.

#
# Copy and paste the lines below to install the latest 64-bit set.
#
BOOTSTRAP_TAR="bootstrap-trunk-x86_64-20190317.tar.gz"
BOOTSTRAP_SHA="cda0f6cd27b2d8644e24bc54d19e489d89786ea7"
# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}
# Verify the SHA1 checksum.
@stellarpower
stellarpower / install_wormhole.bat
Last active December 17, 2019 08:18 — forked from princebot/install_wormhole.bat
Install Python magic-wormhole on Windows.
::
:: This script installs wormhole (https://github.com/warner/magic-wormhole) and
:: its prerequisites. Run this as an administrator.
::
:: Install chocolatey.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install Python 3. Python3.8 has removed time.clock which breaks autobahn on which wormhole relies
choco install -y python3 --version=3.7 --allow-downgrade
ipkg brand attributes
brand: the zone's brand type
ip-type: ip-type of zone. can either be "exclusive" or "shared"
limitpriv: the maximum set of privileges any process in this zone can
obtain
zonename: name of zone
UUID PROVIDER BRAND NAME VERSION
3a7e89b1 joyent illumos Brocade vTM Developer 17.4.0
f8ad1e60 joyent illumos apache 14.1.0
6a62b193 joyent illumos apache 14.2.0
767837d5 joyent illumos apache 14.3.0
f1143527 joyent illumos apache 14.4.0
ffb30b77 joyent illumos apache 15.1.1
d3480de9 joyent illumos apache 15.1.2
b4486f63 joyent illumos apache 15.4.1
efc0f0c1 joyent illumos base 13.1.0
@stellarpower
stellarpower / `zadm doc` output
Last active March 16, 2021 21:22
Nicely-printed output from `zadm doc`; saves browsing the schemata in the source
bhyve brand attributes
brand: the zone's brand type
ip-type: ip-type of zone. can either be "exclusive" or "shared"
limitpriv: the maximum set of privileges any process in this zone can
obtain
vcpus: CPU
@stellarpower
stellarpower / Dockerfile
Last active June 9, 2021 14:59 — forked from hermanbanken/Dockerfile
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@stellarpower
stellarpower / findPackageLibraryDependencies.fish
Created March 2, 2022 06:02
Find Debian Packages for Library Dependencies for a Given Binary
#!/usr/bin/env fish
set Directory (dirname (realpath (status -f) ) )
set ScriptName (basename (status -f))
set ScriptPath $Directory/$ScriptName
function fullPathLibraries -a pathToBinary
ldd $pathToBinary | grep '=>' | sd '.*=>\s*([^\s]+)\s+.*' '$1'
end
@stellarpower
stellarpower / Google Maps Satellie Tile Fetcher.js
Last active April 13, 2022 14:32 — forked from praeclarum/TileSticher.cs
Downloads and stitches map tiles
// For a given latitude, longitude, and zoom, returns the URL to an image for that tile.
function tileIndex(latitude, longitude, zoom){
if ((latitude === undefined) || (longitude === undefined) || (zoom === undefined))
throw("Arguments mising in tileIndex");
var lat_rad = latitude / 180 * Math.PI;
var n = 1 << zoom;
var xtile = n * ((longitude + 180) / 360);
var ytile = n * (1 - (Math.log (Math.tan (lat_rad) + 1/Math.cos (lat_rad)) / Math.PI)) / 2;
#!/usr/bin/fish
# Instal;ls some rust CLI tools, as documented here: https://zaiste.net/posts/shell-commands-rust/
# Make the shell slightly less hellish and bring it kicking and screaming into the early 2000s.
pushd /tmp
mkdir rustyShell && cd rustyShell
# Debian packages
@stellarpower
stellarpower / Earthfile
Created January 11, 2023 23:36
OpenVibe Earthfile
# From: https://gist.github.com/jfrey-xx/ed0a8d5d881a7a5734064e6ad89beccd
VERSION --use-cache-command 0.6
build:
# FROM custom:focal
# I originally used a custom image here, with compilers installed.
# Using stock ubuntu may have some steps missing, but it should be easy to add (e.g. standard buildtools)