Skip to content

Instantly share code, notes, and snippets.

View boina-n's full-sized avatar

Nadjmou BOINA boina-n

  • Genopsys
  • Anywhere
  • 14:58 (UTC +04:00)
View GitHub Profile
@boina-n
boina-n / git-ssh-key.txt
Created August 16, 2017 09:35
Use ssh key with Git
$ sudo su - git
$ cd repos/
$ mkdir test-repo.git
$ git init --bare
# from the jumpbox or any server
# make sure the the repo host is declared in the ssh config file:
$ cat ~/.ssh/config
host myrepo
@boina-n
boina-n / bosh-root-ca.txt
Last active August 31, 2017 21:35
How to find bosh root ca with opsmanager API.
https://[opsmanager.ip]/api/v0/security/root_ca_certificate
@boina-n
boina-n / list all routes from pcf
Last active September 1, 2017 23:10
[CloudFoundry][API][ROUTES] - list all routes
for space_guid in `cf curl /v2/spaces | jq -r ".resources[].metadata.guid"`
do
routes_url=$(cf curl /v2/spaces/$space_guid | jq -r ".entity.routes_url")
for route in $(cf curl $routes_url | jq -r ".resources[].metadata.guid")
do
hostname=$(cf curl /v2/routes/$route | jq -r ".entity.host")
domain_guid=$(cf curl /v2/routes/$route | jq -r ".entity.domain_guid")
domaine_name=$(cf curl /v2/domains/$domain_guid | jq -r ".entity.name")
echo $hostname"."$domaine_name
done
@boina-n
boina-n / auto-deploy.md
Created September 3, 2017 22:41 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@boina-n
boina-n / publish_release_with_github-realease.md
Last active September 5, 2017 15:14
publish_release_with_github-realease.md
export GITHUB_TOKEN= $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
version="2.0.0"
vtag="v$version"
username=boina-n
repo=cf-all-routes
lrname=linux-amd64-$repo-release
wrname=windows-amd64-$repo-release.exe
uname="$repo-$version"
utgzname="$repo $version.tgz"
@boina-n
boina-n / Update_PCF_pipelines.md
Created September 6, 2017 21:03
Update PCF pipelines

Update PCF pipelines

Download the pipelines from the PivNet

untargz the pipelines

$ tar -zxvf pcf-pipelines-v0.16.0.tgz
@boina-n
boina-n / Pivotal file_download_api.txt
Last active October 3, 2017 10:03
Pivotal file_download_api
apikey=YourApiKeyhere
filename=pcfdev-v0.24.0+PCF1.9.0-linux.zip
url=https://network.pivotal.io/api/v2/products/pcfdev/releases/4027/product_files/12667/download
wget -O $filename --header="Authorization: Token $apikey" $url
# If you are behind a proxy:
curl -x http://myproxyaddress:port --proxy-user username:password' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token $apikey" -X GET $url -o $filename
@boina-n
boina-n / http.s.regex.txt
Created October 5, 2017 20:54
regex http/https
^https?://(?:[^:@/]+(?::[^@/]+)?@)?(?:localhost|127\.\d+\.\d+\.\d+)(?::\d+)?(?:/.*)?$
@boina-n
boina-n / Spring-cloud-services-debug.txt
Created October 5, 2017 20:57
Spring cloud services debug notes
bosh logs <Rmq-servers> <index>
bosh logs <cc-jobs> <index>
cf target -o system -s p-spring-cloud-services
cf logs spring-cloud-broker --recent
cf logs spring-cloud-broker-worker --recent
@boina-n
boina-n / cloud-config.txt
Created October 8, 2017 21:35
Cloud Config aws
azs:
- cloud_properties:
availability_zone: us-west-2a
name: z1
- cloud_properties:
availability_zone: us-west-2b
name: z2
- cloud_properties:
availability_zone: us-west-2c
name: z3