Skip to content

Instantly share code, notes, and snippets.

View boina-n's full-sized avatar

Nadjmou BOINA boina-n

  • Genopsys
  • Anywhere
  • 05:32 (UTC +04:00)
View GitHub Profile
@boina-n
boina-n / apt-proxy.sh
Last active June 1, 2020 18:29
set proxy for apt in ubuntu
cat <<EOF > /etc/apt/apt.conf.d/01proxy
Acquire::http::Proxy "http://10.0.2.2:8080"; EOF
@boina-n
boina-n / shell-trick01.txt
Created June 7, 2017 10:36
How to find a file containing a text
# The text in the file to be found: "83oMef5367"
find . -type f -exec grep -nH "83oMef5367" {} \;
@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 / ssh-git-trick.txt
Created June 16, 2017 13:11
How to make git works with a different private key except id_rsa
host myrepo
HostName 10.10.8.19
IdentityFile ~/.ssh/gitsrv.key
User git
host myconcourse
HostName 10.10.9.28
IdentityFile ~/.ssh/mykey
User concourse-user
@boina-n
boina-n / Hijack_concourse.txt
Created August 16, 2017 09:30
How to Hijack a container in Concourse
fly -t pcf login -k
fly -t pcf containers
sudo /home/nboina/bin/fly -t pcf login -k
sudo /home/nboina/bin/fly -t pcf hijack -j pcf-sleep-all/sleep-apps
@boina-n
boina-n / concourse_uaa_user.txt
Created August 16, 2017 09:31
Create the concourse-ci uaa users
uaac target
uaac token client get admin
uaac user add concourse-ci -p $Password--emails nboina@example.com
uaac member add cloud_controller.admin concourse-ci
uaac member add scim.read concourse-ci
uaac member add scim.write concourse-ci
@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 / 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 / push_dumb_static_app.sh
Last active October 20, 2017 20:18
[Cloud Foundry][How to push a dumb static app]
mkdir dumb-static-app
cd dumb-static-app/
touch Staticfile
echo 'Dumb static app' > index.html
cf push mydumbapp -m 64M
@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.