Skip to content

Instantly share code, notes, and snippets.

View freyes's full-sized avatar
🥑

Felipe Reyes freyes

🥑
View GitHub Profile
@anjohnson
anjohnson / git-on-lp.md
Last active November 7, 2022 16:43
Notes for Git on Launchpad

Andrew's Notes on using Git with Launchpad

This page describes how I'm planning to work with git and lp, others don't have to follow my approach. The mirroring that I describe below may be slightly unusual, so your local git expert might not fully understand it.

Getting Started

Configure the lp: prefix in ~/.gitconfig

[url "git+ssh://anj@git.launchpad.net/"]
    insteadof = lp:
#!/bin/bash -eu
# THE FOLLOWING PROCEDURE TO REFORMAT AN OSD AND ITS JOURNAL HAS BEEN TESTED
# ON UBUNTU TRUSTY WITH CEPH 0.94.8-0ubuntu0.15.04.1~cloud0 FROM KILO UCA.
OSD_ID=48
OSD=osd.$OSD_ID
BLK_DEV=/dev/vdb
JOURNAL_UUID=`cat /var/lib/ceph/osd/ceph-$OSD_ID/journal_uuid`
package main
import (
"fmt"
"os"
"github.com/juju/utils"
)
const MIN_LEN = 30
package main
import (
"fmt"
"os"
"github.com/juju/utils"
)
const MIN_LEN = 30
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 17, 2024 07:59
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@niedbalski
niedbalski / recover-lost-agent.py
Last active October 10, 2022 04:51
recover a lost Juju agent
#!/usr/bin/env python
"""
This is a tool for recovering a lost juju unit
Usage:
{0} controller-ip unit-from unit-to basedir
"""
import subprocess
import shlex
@olih
olih / jq-cheetsheet.md
Last active May 15, 2024 22:26
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@congto
congto / websso_federation_setup.sh
Last active January 4, 2022 19:06
setup websso environment in one shot, works with google
#!/bin/bash
fqdn=devstackctl
user=uvdc
# Install the OpenID Connect apache module
# not necessary, but will resolve any config errors when installing the module
sudo apt-get install libjansson4 libhiredis0.10 libcurl3 -y
sudo apt-get install -f -y
# TODO: figure out why v1.8.4 and 1.8.5 won't install
@niedbalski
niedbalski / update-juju-unit-hostnames.py
Created March 3, 2016 22:43
update-juju-unit-hostnames.py
#!/usr/bin/env python
"""
This script will update all the juju units using
the hostname defined on the provided dns server
Usage:
{0} ip-of-maas-dns-server
"""
#!/bin/bash -eux
repos=(
charm-swift-storage
charm-swift-proxy
charm-rabbitmq-server
charm-percona-cluster
charm-openvswitch-odl
charm-openstack-dashboard
charm-odl-controller
charm-nova-compute