Skip to content

Instantly share code, notes, and snippets.

View arosales's full-sized avatar

Antonio arosales

  • Denver, Colorado
View GitHub Profile
@nurrony
nurrony / configuration.md
Last active July 10, 2020 15:39
Auto git push script to post Ghost blog to Github Pages

Assumption

I am asumming that you have following this already taken care in your dev machine

  1. Fully configured up and running [Ghost][1] blog
  2. Successfully installed [Buster][2] Script
  3. Already have Git Page for your account

Instructions

@marcoceppi
marcoceppi / activity.py
Created November 6, 2015 03:20
Charm store activity
import os
import humanize
import requests
import datetime
import tabulate
from dateutil.parser import parse
r = requests.get('https://api.jujucharms.com/charmstore/v4/changes/published?start=2015-10-28')
@marcoceppi
marcoceppi / wee.py
Created August 7, 2015 16:53
Find all bugs opened against a distribution
from launchpadlib.launchpad import Launchpad
lp = Launchpad.login_anonymously('mc', 'production')
ppl = lp.people['ibmcharmers']
charm = lp.distributions['charms']
tasks = []
for p in ppl.members:
tasks = tasks + [t for t in charm.searchTasks(bug_reporter=p)]
cleanup:
description: |
**Warning** THIS IS DESTRUCTIVE **WARNING** WILL REMOVE STOPPED DATA CONTAINERS
Destructive action to clean up non-running/intermediate containers/images
params:
type:
description: "containers or images"
default: "images"
run:
description: Pulls a docker container from the docker registry, and run with a restart policy
import os
import subprocess
import yaml
from charmhelpers.core import hookenv
LATEST = "latest"
class Service(dict):
@lazypower
lazypower / restore-from-ip-changes.md
Last active August 29, 2015 14:08
Restoring a Juju Environment when every last IP has changed

How to restore connectivity in a Juju Environment when EVERY IP has changed

Restoring connectivity to the state server from your client workstation

You will need to edit the jenv that juju created for the environment during juju bootstrap which will be located: $JUJU_HOME/environments/<environment_name>.jenv

The jenv has a yaml file format, so be familiar with that so you know what to look for:

state-servers:
  • 173.173.4.187:17070
@tvansteenburgh
tvansteenburgh / errors.yaml
Last active August 29, 2015 14:07
charmguardian-report filters
returncode: content != 0
test: content not in ('charm-proof', 'make lint')
output: not content.startswith('bundletester failed')