Skip to content

Instantly share code, notes, and snippets.

View boina-n's full-sized avatar

Nadjmou BOINA boina-n

  • Genopsys
  • Anywhere
  • 21:51 (UTC +04:00)
View GitHub Profile
@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 / 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 / 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 / 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 / ssl-cloud-foundry.sh
Last active April 26, 2017 15:34
How to generate an ssl wildcard certificat for Cloud Foundry.
openssl req -new -nodes -out wc.cf.boina.csr -newkey rsa:2048 -keyout wc.cf.boina.key -config <(
cat <<-EOF
[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[ dn ]
@boina-n
boina-n / jqpcfdev.sh
Created April 14, 2017 08:33
Help interpret json with jq command.
cf curl /v2/events | jq '.resources[].entity | select(.actee_type=="app") |{actor: .actor_name, type: .type, date: .timestamp, application: .actee_name}'
zone "toto-tr.fr.rt" {
type master;
masters { 213.154.64.11; };
file "slaves/db.toto-tr.fr.rt";
};
#Replace this :
(^[a-z0-9\-]+(\.[a-z0-9\-]+)*)
@boina-n
boina-n / dns_autocompile.sh
Created April 11, 2017 22:04
This script automatically download the sources of bind and compile them. The executable are installed on a custom location.
#!/bin/bash
cd /tmp
url=http://ftp.isc.org/isc/bind9/9.9.8-P2/bind-9.9.8-P2.tar.gz
wget $url
bindv=9.9.8-P2
compil=TCP3sec-nossl-rrl-xtds-ipv6-64bits
tar -zxvf bind-$bindv.tar.gz
patch /tmp/bind-$bindv/bin/named/client.c < /usr/local/progs/compil-resources/client.patch
less /tmp/bind-$bindv/bin/named/client.c
@boina-n
boina-n / dns_autocompile.sh
Created April 11, 2017 22:03
This script automatically download the sources of bind and compile them. in order to create an install on the server
#!/bin/bash
cd /tmp
url=http://ftp.isc.org/isc/bind9/9.9.8-P2/bind-9.9.8-P2.tar.gz
wget $url
bindv=9.9.8-P2
compil=TCP3sec-nossl-rrl-xtds-ipv6-64bits
tar -zxvf bind-$bindv.tar.gz
patch /tmp/bind-$bindv/bin/named/client.c < /usr/local/progs/compil-resources/client.patch
less /tmp/bind-$bindv/bin/named/client.c
@boina-n
boina-n / simple_resperf.sh
Created April 11, 2017 22:01
dns resperf test
for i in seq {1..9}; do resperf -d dns_domain_names.txt -s $host -f inet -p 53 -e 2> /dev/null |grep throughput ; done