Skip to content

Instantly share code, notes, and snippets.

@fishnix
fishnix / main.go
Last active April 20, 2022 01:35
SSH certificate signing example in golang
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"os"
"time"
"golang.org/x/crypto/ssh"
@fishnix
fishnix / volume.md
Last active January 30, 2018 10:49
Create local NFS volume for influxdb service in docker swarm
docker network create --attachable --driver overlay data
docker volume create --driver local \
  --opt type=nfs  --opt o=addr=192.168.1.17,rw \
  --opt device=:/volume1/docker/influxdb influxdb
@fishnix
fishnix / Jenkinsfile
Created May 24, 2017 17:10 — forked from abayer/Jenkinsfile
New Declarative Pipeline features in 1.1
pipeline {
agent {
// "node" is a new agent type that works the same as "label" but allows
// additional parameters, such as "customWorkspace" below.
node {
label "some-label"
// This is equivalent to the "ws(...)" step - sets the workspace on the
// agent to a hard-coded path. If it's not an absolute path, it'll be
// relative to the agent's workspace root.
customWorkspace "/use/this/path/instead"
@fishnix
fishnix / README.md
Last active December 3, 2016 02:44
Vagrant 1.8.7 homebrew cask

Uninstall and cleanup vagrant 1.9.x

brew cask uninstall vagrant
rm -Rf ~/.vagrant.d

Install Vagrant 1.8.7 from this cask

@fishnix
fishnix / bg.rb
Created March 18, 2016 14:05 — forked from kenichi/bg.rb
require 'angelo'
class BG < Angelo::Base
websocket '/' do |ws|
websockets << ws
end
end
@fishnix
fishnix / node_time.rb
Created February 6, 2016 00:52
Chef Node Info
####
#
# Script to pull and display useful node information. OHAI!
# Author: E Camden Fisher <fish@fishnix.net>
####
# require 'formatador'
require 'colorize'
require 'pp'
@fishnix
fishnix / config.json
Last active August 29, 2015 14:20 — forked from anonymous/config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#df077a",
"@brand-success": "#5cb85c",
@fishnix
fishnix / gist:3e977e802aaf7c49f4e1
Created February 4, 2015 19:11
ignore maven server certificates
mvn clean install -DskipTests -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@fishnix
fishnix / doesnt
Last active August 29, 2015 14:04
terraform.tfvars
secret_key = "some secret key"
access_key = 'some access key'
or
access_key = "some access key"
secret_key = 'some secret key'
or