Skip to content

Instantly share code, notes, and snippets.

View mikamboo's full-sized avatar
🏠
Working from home

Michaël P.O. mikamboo

🏠
Working from home
View GitHub Profile
@mikamboo
mikamboo / .gitlab-ci.yml
Created January 29, 2021 09:09 — forked from angeloreale/.gitlab-ci.yml
Dockerizing a Node.js and MongoDB app with CI/CD Pipelines on Gitlab for staging and production environments.
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
STAGE_CONTAINER: dev
PROD_CONTAINER: prod
DEV_FOLDER: /path/to/repo/dev
PROD_FOLDER: /path/to/repo/prod
@mikamboo
mikamboo / README.md
Last active April 10, 2024 08:33 — forked from steimntz/create_user_for_namespace.sh
Kubernetes : Create Service Account with permission for a specific namespace + Generate KUBECONFIG

Create KUBECONFIG limited to specific namespace

  • create_user_for_namespace.sh: Create $namespace-user ServiceAccount with full access to specified namespace and get KUBECONFIG
  • kubeconfig-generator.sh : Generate the KUBECONFIG of an existing sericeaccout + namespace

Ex : Create Gitlab-user on gitlab namespace

GIST_URL=https://gist.githubusercontent.com/mikamboo/5e20ea4a0aef8289e40f62844dec7bc8
curl $GIST_URL/raw/bb5ba7e3cc2b1e7be0006f7a2bc3d0f5d73958ec/create_user_for_namespace.sh | bash -s gitlab
@mikamboo
mikamboo / .env
Created October 21, 2017 11:33 — forked from joshdholtz/.env
Integrate fastlane into your Ionic/Cordova build process
FASTLANE_TEAM_ID = <your team id>
FASTLANE_USER = <your user email>
PRODUCE_APP_IDENTIFIER = com.fastlanescreencast.FastlaneScreencast
CERT_APP_IDENTIFIER = com.fastlanescreencast.FastlaneScreencast
SIGH_APP_IDENTIFIER = com.fastlanescreencast.FastlaneScreencast
ANDROID_KEYSTORE_KEYSTORE_NAME = FastlaneScreencast.keystore
ANDROID_KEYSTORE_ALIAS_NAME = fastlanescreencast
ANDROID_KEYSTORE_PASSWORD = supersecret
@mikamboo
mikamboo / firebase_create.js
Created March 5, 2017 15:28 — forked from anantn/firebase_create.js
Firebase: Creating data if it doesn't exist. This snippet creates a user only if it doesn't already exist.
function go() {
var userId = prompt('Username?', 'Guest');
var userData = { name: userId };
tryCreateUser(userId, userData);
}
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users';
function userCreated(userId, success) {
if (!success) {
@mikamboo
mikamboo / app-1.spec.ts
Last active March 5, 2017 01:24 — forked from wkwiatek/app-1.spec.ts
Angular 2 test snippets for Angular final version. Codebase for https://developers.livechatinc.com/blog/category/programming/angular-2/
// App
import { Component } from '@angular/core';
@Component({
selector: 'app',
template: '<span>{{ sayHello() }}</span>',
})
export class App {
public name: string = 'John';
@mikamboo
mikamboo / supervisor.conf
Created January 7, 2017 00:13 — forked from tsabat/supervisor.conf
Sample supervisor config file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@mikamboo
mikamboo / travis-ci-deploy.md
Last active December 17, 2016 22:56 — 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.

@mikamboo
mikamboo / ionic_dockerfile
Created April 20, 2016 13:20 — forked from lighta971/ionic_dockerfile
Ionic cordova android dockerfile
# Android development environment for ubuntu precise (12.04 LTS).
# version 0.0.1
# Start with ubuntu precise (LTS).
FROM ubuntu:12.04
MAINTAINER Aurel <lighta971@live.fr>
# Never ask for confirmations
ENV DEBIAN_FRONTEND noninteractive
@mikamboo
mikamboo / bst.js
Last active August 29, 2015 14:12 — forked from trevmex/bst.js
/*
* File: bst.js
*
* A pure JavaScript implementation of a binary search tree.
*
*/
/*
* Class: BST
*
@mikamboo
mikamboo / gist:5684516
Last active December 17, 2015 22:49 — forked from anonymous/gist:5684491
Java create a class : constructors & get / set methods
/**
* Classe Personne
* Décrit un objet personne par son nom et son age
*
*/
public class Personne {
private String name;
private int age;