Skip to content

Instantly share code, notes, and snippets.

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

Rémy LAVERGNE-PRUDENCE remylavergne

🏠
Working from home
View GitHub Profile
@remylavergne
remylavergne / android-utils.md
Created March 4, 2020 12:59
[Android] Utils

Bitmap to Byte Array

    suspend fun bitmapToByteArray() = withContext(Dispatchers.Default) {
        val stream = ByteArrayOutputStream()
        imageSelected?.compress(Bitmap.CompressFormat.PNG, 100, stream)
        imageSelectedByteArray = stream.toByteArray()
    }
@remylavergne
remylavergne / useful-commands.md
Created December 10, 2019 10:32
[Kubernetes] Usefull commands #kubectl

Kubernetes commands

Copy files to local host

kubectl cp default/POD_NAME:bin/FILE_NAME /Users/username/FILE_NAME
@remylavergne
remylavergne / nginx-workload-example.yaml
Last active December 8, 2019 20:29
[Rancher] Bind d'un dossier Pod vers le node Host #rancher #volume
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "8"
field.cattle.io/creatorId: user-8xxx7
field.cattle.io/publicEndpoints: '[{"addresses":["xxx.xxx.xxx.135"],"port":32754,"protocol":"TCP","serviceName":"default:nginx-volume-test-nodeport","allNodes":true}]'
creationTimestamp: "2019-12-08T14:27:49Z"
generation: 9
labels:
@remylavergne
remylavergne / rancher-ubuntu.md
Last active January 25, 2021 11:13
[Rancher] Install Rancher on fresh Ubuntu install

Install Rancher on fresh Ubuntu server install

Provider used : Contabo

Create a sudo user

Never use root as main account.

Access server with ssh.

@remylavergne
remylavergne / shortcuts.md
Last active February 13, 2020 08:35
[Git] Shortcuts and useful commands #cli

Git shortcuts and commands

Search commit from specific user

git log --date=short --branches --since=3.months.ago --author=xyz

Search all commit from comment

@remylavergne
remylavergne / clean-docker.md
Created November 28, 2019 08:51
[Docker] Clean Docker

Docker Cleaning

Useful commands

Sizes

@remylavergne
remylavergne / change-repo-provider.md
Last active January 12, 2020 20:26
[GitHub] Bitbucket to GitHub repository #migration #git #repository

Bitbucket to GitHub

$ git clone --mirror https://bitbucket.org/tommcfarlin/acme-repository.git
$ cd acme-repository