Skip to content

Instantly share code, notes, and snippets.

View armandgrillet's full-sized avatar

Armand Grillet armandgrillet

View GitHub Profile
@armandgrillet
armandgrillet / main.go
Created August 29, 2020 13:59
Get email address of user logging in using Google OAuth 2
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@armandgrillet
armandgrillet / demo1.sh
Created November 6, 2018 03:27
MesosCon 2018 - Using and extending the Mesos CLI : Demo 1
# Write a script:
echo "echo Hello World" > hello-world.sh
# Upload the script to your task's container:
$ cat hello-world.sh | mesos task exec -i exec-test bash -c "cat > hello-world.sh"
# Give the fiel executable permissions:
$ mesos task exec exec-test chmod a+x hello-world.sh
# Execute the script inside the container:

Keybase proof

I hereby claim:

  • I am armandgrillet on github.
  • I am armandgrillet (https://keybase.io/armandgrillet) on keybase.
  • I have a public key ASBqP589mX7fOzwAHxhOyTUHYB2Zgd7y4O_hJt_dn7NA4Ao

To claim this, I am signing this object:

apiVersion: v1
kind: ReplicationController
metadata:
name: app
labels:
name: app
spec:
replicas: 1
selector:
name: app
{
"id": "web",
"cmd": "python app.py",
"cpus": 0.5,
"mem": 64.0,
"instances": 2,
"container": {
"type": "DOCKER",
"docker": {
"image": "prakhar1989/foodtrucks-web",
{
"id": "es",
"container": {
"type": "DOCKER",
"docker": {
"network": "HOST",
"image": "elasticsearch"
}
}
}
es:
image: elasticsearch
container_name: "es"
web:
image: prakhar1989/foodtrucks-web
command: python app.py
ports:
- "5000:5000"
volumes:
- .:/code
{
"kind": "Policy",
"apiVersion": "v1",
"predicates": [
{
"name": "PodFitsPorts"
},
{
"name": "PodFitsResources"
},
@armandgrillet
armandgrillet / swarm-debian.sh
Created June 10, 2015 09:49
Installing Docker Swarm on Debian
$ apt-get update && apt-get install golang git mercurial
$ mkdir ~/go
$ export GOPATH=~/go
$ go get -u github.com/docker/swarm
$ export PATH=$PATH:~/go/bin
$ echo "PATH=$PATH:~/go/bin" >> ~/.bashrc
$ echo "export PATH" >> ~/.bashrc .