Skip to content

Instantly share code, notes, and snippets.

View lazypower's full-sized avatar
💭
Bring back independent blogs, rss feeds, and the small web.

Charles "Chuck" Butler lazypower

💭
Bring back independent blogs, rss feeds, and the small web.
View GitHub Profile

Homebrew Formula for a Go app

These are quick notes from making a glan Formula and Tap.

Add go build script to your Git repo

gobuild.sh

#!/bin/bash

To get better acquainted with snapping I built a snapcraft environment in a docker container. We didn't have many project goals for this other than getting snapcraft running in a consistent environment everywhere (including my co-workers OSX installation).

We feel that we're on the cusp of something slightly greater than what this MVP is.

  • Give developers easy access to the snapcraft tools.
  • You can mount a directory from your host into the container to do snapcraft builds, and leave you the artifacts
  • Run this in CI with some slight on-build modifications to automate any projects snap building process
  • Runs somewhat similar to make cleanbuild (which leverages lx[c|d]!)

We are looking to snap up Kubernetes for the upstream packaging. Right now it looks like we may have to build a custom plugin. If anyone wants to help out with that please let me know.

znc:
image: lazypower/znc
volumes:
- znc_data:/znc_data
ports:
- 6699:6667
restart: always

relation-get

relation-get reads the settings of the local unit, or of any remote unit, in a given relation (set with -r, defaulting to the current relation identifier, as in relation-set). The first argument specifies the settings key, and the second the remote unit, which may be omitted if a default is available (that is, when running a relation hook other than -broken).

If the first argument is omitted, a dictionary of all current keys and values will be printed; all values are always plain strings without any

@lazypower
lazypower / leader.md
Last active November 24, 2015 22:09 — forked from mbruzek/leader.md

leader-set

leader-set immediately writes the key/value pairs to the juju controller, which will then inform non-leader units of the change. It will fail if called without arguments, or if called by a unit that is not currently service leader.

leader-set lets you write string key=value pairs, but with the following differences:

  • there's only one leader-settings bucket per service (not one per unit)
  • only the leader can write to the bucket
@lazypower
lazypower / gist:a9e22b974556f8b5396d
Last active August 29, 2015 14:27 — forked from Reve/Crucible Server Tutorial.md
Crucible Server Tutorial

The EVEmu project is a developing EVE Online server suite and as yet does not support most features offered in the game.

EVEmu Crucible is compatible with EVE Crucible Client v1.6.5 build 360229.

DISCLAIMER

EVEmu is an educational project. This means, our primary interest is to learn and teach us and our users more about C++ project development in a large scale. Our software is not intended for running public servers, and we do not support that. We are not responsible for what others do with the source code downloaded from this project. For users who are new to build servers and would like some background information on what they are doing for learning please go here.

There is a video guide here. Evemu did NOT make this guide and it is different to the instructions listed below.

@lazypower
lazypower / retro.py
Last active August 29, 2015 14:21 — forked from benwebber/retro.py
#!/usr/bin/env python
"""
An 8-bit avatar generator.
"""
from __future__ import division
import argparse
import hashlib
#!/bin/bash
set -eux
# This script collects all the charms we are trying to get running on power.
# Theh first parameter is the base directory destination.
if [[ -z "$1" ]]; then
cd $1
fi
# Power only supports trusty.
alias sb_start="sudo start starbound"
alias sb_stop="sudo stop starbound"
alias sb_restart="sb_stop;sb_start"
alias sb_update="sudo /home/ribesg/sb_update"
alias sb_online="netstat -nt | grep -c 21025"
alias sb_status="sudo status starbound"