Skip to content

Instantly share code, notes, and snippets.

@KrustyHack
KrustyHack / doc.adoc
Last active July 5, 2024 14:31
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@RantyDave
RantyDave / root-in-opt
Created May 17, 2017 02:06
An SMF service that moves a SmartOS root directory onto the persistent storage
#!/bin/sh
mkdir -p /opt/root
mkdir -p /opt/root/.ssh
cd /
cp /root/.* /opt/root
cp /root/.ssh/* /opt/root/.ssh
rm -rf /root
ln -s /opt/root
touch /opt/root/.forward
echo 'real@email' > /opt/root/.forward
@halgari
halgari / gist:f431b2d1094e4ec1e933969969489854
Last active May 11, 2024 02:23
What I want from a Type System
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here
is a short list of what I would need from a type system for it to be truely useful to me:
1) Full type inference. I would really prefer to be able to write:
(defn concat-names [person]
(assoc person :full-name (str (:first-name person)
(:second-name person))))
And have the compiler know that whatever type required and produced from this function was acceptible as long as the
@jdoss
jdoss / ovs_libvirt.md
Created October 31, 2015 23:30
Configure Fedora Server with Open vSwitch and Libvirt

This will allow you to use Open vSwitch with Libvirt to put your VMs on the same network as the host and not use the default NAT based bridge.

Install Packages

dnf install -y virt-install libvirt openvswitch

Services Prep Work

Disable NetworkManager :(

@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 4, 2024 13:00
Backend Architectures Keywords and References
@ngryman
ngryman / README.md
Last active January 16, 2023 14:07
intellij javascript live templates

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.
@whytheplatypus
whytheplatypus / enableMulticast.sh
Last active April 2, 2023 21:10
Quickly enable mdns on a smartos machine.
#!/bin/bash
mv /etc/nsswitch.conf /etc/nsswitch.conf_old
cp /etc/nsswitch.dns /etc/nsswitch.conf
svcadm enable multicast
svcs multicast
@jahewson
jahewson / smartos-on-a-budget.sh
Last active March 9, 2024 07:27
Installing and Configuring SmartOS on a budget server (with a /29)
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##################################################################
Installing and Configuring SmartOS on a budget server (with a /29)
##################################################################
# if you find this gist useful, please star it
# please be aware that budget hosting companies usually cut corners somewhere,
@adharris
adharris / postgres_array.go
Created November 28, 2012 19:52
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"