Skip to content

Instantly share code, notes, and snippets.

View timani's full-sized avatar

Timani Tunduwani timani

View GitHub Profile
@timani
timani / #1 list all public bosh stemcells.sh
Created July 10, 2016 00:22
A tour of bosh stemcells from the command line - Cloud Foundry
tmunyaradzi:~ tmunyaradzi$ bosh public stemcells
+--------------------------------------------------------------------+
| Name |
+--------------------------------------------------------------------+
| bosh-stemcell-2427-aws-xen-ubuntu.tgz |
| bosh-stemcell-2652-aws-xen-centos.tgz |
| bosh-stemcell-3146.7-aws-xen-centos-7-go_agent.tgz |
| bosh-stemcell-3146.7-aws-xen-ubuntu-trusty-go_agent.tgz |
| light-bosh-stemcell-3146.17-aws-xen-hvm-centos-7-go_agent.tgz |
| light-bosh-stemcell-3146.5-aws-xen-ubuntu-trusty-go_agent.tgz |
@timani
timani / #0.1 List all stemcells.sh
Last active July 10, 2016 15:23
Upgrading Bosh lite - Cloud Foundry
tmunyaradzi:~ tmunyaradzi$ bosh stemcells
Acting as user 'admin' on 'Bosh Lite Director'
No stemcells
@timani
timani / gist:60e62da535a312e526a9026a5002780f
Last active July 9, 2016 18:52
Bookbinder basic workflow - getting started
$ bookbinder
Commands:
bookbinder --help # Print this message
bookbinder --version # Print the version of bookbinder
bookbinder bind <local|remote> [options] # Bind the sections specified in config.yml from <local> or <remote> into the final_app directory
bookbinder generate <book_name> # Generate a skeleton book that can be bound with "bookbinder bind"
bookbinder imprint <local|remote> [options] # Generate a PDF for a given book
bookbinder punch <git tag> # Apply the specified <git tag> to your book, sections, and layout repo
bookbinder update_local_doc_repos # Run `git pull` on all sections that exist at the same directory level as your book directory
bookbinder watch [repo1 [repo2]] # Bind and serve a local book, watching for changes
tmunyaradzi:GSS tmunyaradzi$ mkdir pcf-onboarding
tmunyaradzi:GSS tmunyaradzi$ cd pcf-onboarding
tmunyaradzi:pcf-onboarding tmunyaradzi$ vim Gemfile
tmunyaradzi:pcf-onboarding tmunyaradzi$ bundle install
[!] There was an error parsing `Gemfile`: Undefined local variable or method `bookbindery' for Gemfile. Bundler cannot continue.
# from /Users/tmunyaradzi/Pivotal/GSS/pcf-onboarding/Gemfile:2
# -------------------------------------------
# source 'https://rubygems.org'
tmunyaradzi:docs-book-cloudfoundry tmunyaradzi$ bookbinder
pwd
Commands:
bookbinder --help # Print this message
bookbinder --version # Print the version of bookbinder
bookbinder bind <local|remote> [options] # Bind the sections specified in config.yml from <local> or <remote> into the final_app directory
bookbinder generate <book_name> # Generate a skeleton book that can be bound with "bookbinder bind"
bookbinder imprint <local|remote> [options] # Generate a PDF for a given book
bookbinder punch <git tag> # Apply the specified <git tag> to your book, sections, and layout repo
bookbinder update_local_doc_repos # Run `git pull` on all sections that exist at the same directory level as your book directory
$ nslookup https://getpantheon.com
Server: 172.20.0.1
Address: 172.20.0.1#53
Non-authoritative answer:
Name: https://getpantheon.com
Address: 198.105.244.11
Name: https://getpantheon.com
Address: 198.105.254.11
@timani
timani / Git Issue Export for Pivotal
Created May 26, 2016 06:21 — forked from glenbot/Git Issue Export for Pivotal
Export your open issues in github to a pivotal tracker friendly csv for import, requires github2 python api-client
import csv
from github2.client import Github
# api settings for github
git_username = 'your_git_username'
git_api_token = 'your_git_api_token'
git_repo = 'username/repo_name'
# import all issues as this story type
pivotal_story_type = 'Bug'
@timani
timani / make_github_issue.py
Created May 26, 2016 06:18 — forked from JeffPaine/make_github_issue.py
Make an issue on github using API V3 and Python
import json
import requests
# Authentication for user filing issue (must have read/write access to
# repository to add issue to)
USERNAME = 'CHANGEME'
PASSWORD = 'CHANGEME'
# The repository to add this issue to
REPO_OWNER = 'CHANGEME'
@timani
timani / update_opsmanager_hostname.sh
Created May 16, 2016 18:02 — forked from mandarjog/update_opsmanager_hostname.sh
After a 1.7+ opsmanager restarts with a new ip address, this script will update it in the database
#!/bin/bash
# After a 1.7+ opsmanager restarts with a new ip address
# ssh into the opsmanager as 'ubuntu' and
# Run this file from the opsmanager as follows
# sudo su -l postgres < thisfile.sh >
# Get the current public ip or hostname from aws metadata
HN=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
@timani
timani / Makefile
Created April 17, 2016 04:11 — forked from ericdwhite/Makefile
Example using CURL to access https://www.newsblur.com/api
#
# To use this Makefile:
# 1. Change USER, PASSWORD
#
# 2. Login
# $ make login
# This creates a session file holding an API cookie (tmp/session.newsblur)
#
# 3. Downloads your feeds
# $ make feeds