Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cedrickring's full-sized avatar
🌼

Cedric Kring cedrickring

🌼
View GitHub Profile
@cedrickring
cedrickring / ColoredShadow.kt
Last active April 18, 2024 10:29
Draw a colored shadow in Android Jetpack Compose
/*
Copyright 2020 Cedric Kring.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@cedrickring
cedrickring / mergeObjects.js
Created September 19, 2020 20:46
Deep merge two objects in javascript
function mergeObjects(target, source, mergeArrayWith) {
if (!mergeArrayWith) {
mergeArrayWith = (targetArray, sourceArray) => [...targetArray, ...sourceArray];
}
Object.keys(source).forEach(key => {
const existingValue = target[key];
const valueToBeMerged = source[key];
if (Array.isArray(existingValue)) {
"curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
"Plugins"
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'drewtempelmeyer/palenight.vim'
Plug 'itchyny/lightline.vim'
call plug#end()
@cedrickring
cedrickring / README.md
Last active December 20, 2018 11:21
Use zsh instead of bash in WSL

Use zsh instead of bash in WSL

Prerequisites

First of all, you need to install your favorite Windows Subsystem for Linux flavor.
For installation steps, see here

Install zsh

To install zsh, you should follow the steps described here.
I'd recommend installing Oh My Zsh too, since it's a great extension for zsh.

apiVersion: v1
kind: Pod
metadata:
name: kaniko
spec:
initContainers:
- name: kaniko-init
image: alpine
args:
- "sh"
@cedrickring
cedrickring / unsubscribe-decorator.ts
Last active February 5, 2019 21:24
Add this to decorator to your RxJS Subscription's to unsubscribe them when ngOnDestroy is called
import { Subscription } from 'rxjs';
/**
* Example:
*
* ```
* @Unsubscribe()
* public subscription: Subscription
* ```
*