Skip to content

Instantly share code, notes, and snippets.

View scallacs's full-sized avatar

Stephane Léonard scallacs

View GitHub Profile
@scallacs
scallacs / README.md
Last active May 21, 2018 14:40
Continuous Integration - Continuous Deployment
@scallacs
scallacs / ParcelTestHelper.java
Last active November 13, 2023 16:34
Android unit test Parcelable object.
import android.os.Parcel;
import android.os.Parcelable;
public class ParcelTestHelper {
public static String DEFAULT_CREATOR_FIELD = "CREATOR";
public static <T extends Parcelable> T createFromParcel(T input, Parcelable.Creator<T> creator) {
Parcel parcel = toParcel(input);
@scallacs
scallacs / bash-cheatsheet.md
Last active April 22, 2018 18:15
Bash cheatsheet

File editing

print only a specific line number

sed -n 5p file

To delete

sed -n 5d file
@scallacs
scallacs / include-bootstrap.md
Created July 10, 2017 09:08
Configure Angular App

Install boostrap with npm npm install bootstrap

Edit file styles.css

@import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
@scallacs
scallacs / docker-cheatsheet.md
Last active April 22, 2018 17:53
Docker / Docker compose cheat sheet

Docker

# List process
docker ps
# Networkds
docker network ls

Bash inside a container

Shell memo

Dev

#!/bin/sh (ou #!/bin/bash) # Header for a shell script

Variables

Declaration

variable=50
variable2=`cat file`
@scallacs
scallacs / git-command.md
Last active August 4, 2016 22:16 — forked from aquelito/git-command.md
GIT - Ligne de commande principale

Github

Configuration

Identity Name

$ git config --global user.name "aquelito"