Skip to content

Instantly share code, notes, and snippets.

View nordineb's full-sized avatar

Nordine Ben Bachir nordineb

  • Bekk
  • Oslo, Norway
View GitHub Profile
@nordineb
nordineb / app.yaml
Created December 14, 2022 14:46
app.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: store-v1
namespace: store-ns
spec:
replicas: 2
selector:
matchLabels:
app: store
@nordineb
nordineb / README.md
Created September 13, 2022 14:46
cURL custom DNS resolution
curl https://gist.github.com --resolve 'gist.github.com:443:127.0.0.1
@nordineb
nordineb / README.MD
Created September 13, 2022 14:37
Client Credentials

Client Credentials

curl --location \
--request POST 'https://myidp.mydomain.com/oauth/token' \
--header 'Content-Type: application/json'  \
-d '{"audience":"audience_I_need","grant_type":"client_credentials","client_id":"xxx","client_secret":"secret123"}'
@nordineb
nordineb / readme.MD
Last active July 14, 2022 19:31
HTTP2 with cURL
apiVersion: v1
kind: Service
metadata:
annotations:
networking.gke.io/load-balancer-type: "Internal"
name: echoheaders
labels:
app: echoheaders
spec:
type: LoadBalancer
@nordineb
nordineb / deploy
Last active June 8, 2022 14:10
deploy
apiVersion: apps/v1
kind: Deployment
metadata:
name: echo-deployment
spec:
replicas: 2
selector:
matchLabels:
app: echo-server
template:
@nordineb
nordineb / echoheaders.yaml
Last active June 3, 2022 07:10
echoheaders HTTP2 GKE ingress global load balancer
apiVersion: apps/v1
kind: Deployment
metadata:
name: echoheaders
spec:
replicas: 1
selector:
matchLabels:
app: echoheaders
template:
@nordineb
nordineb / readme.MD
Last active May 20, 2022 15:03
Gitpod:: Install MS marketplace extensions that are not yet available in Open VSX

While more and more extensions land in Open VSX on a daily basis, there still might be cases where you are missing a certain extension that exists in the MS marketplace.

On a real vscode instance, right click on an extension and choose Copy Extension ID

Example:

  • Cloud Code from Google has the extension id googlecloudtools.cloudcode
  • The publisher is googlecloudtools and the extention is cloudcode.

In Gitpod, download the VSIX file using cURL (adapt the values as needed)

@nordineb
nordineb / README.md
Created March 2, 2022 10:05
Access host from docker

Desc

docker.for.mac.host.internal, docker.for.mac.localhost, docker.for.mac.gateway.internal are deprecated, you must now use host.docker.internal, vm.docker.internal, and gateway.docker.internal

Testing

on the host:

nc -l 0.0.0.0 8899
@nordineb
nordineb / readme.MD
Created February 9, 2022 15:22
Vim for kubernetes

aliases

alias k=kubectl
alias kgp='k get po'
alias kdp='k delete po --force --grace-period=0'
alias kaf='k apply -f'
alias kdf='k delete -f'
alias kex='k explain'
alias ker='k explain --recursive'