Skip to content

Instantly share code, notes, and snippets.

@KeigoAlexTanaka
KeigoAlexTanaka / ffmpeg.md
Last active May 24, 2023 12:53 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@aprilmintacpineda
aprilmintacpineda / Using Multiple SSH keys - Beginner Friendly.md
Last active May 15, 2024 06:45
Beginner Friendly: Using Multiple SSH keys

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?

@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@tiernan
tiernan / service-worker.d.ts
Last active February 20, 2022 11:04
Typings for using the Service Worker API with TypeScript
/**
*
* DEPRECIATED: Please use the updated type definitions:
* Service Worker Typings to Supplement lib.webworker.d.ts
* https://gist.github.com/tiernan/c18a380935e45a6d942ac1e88c5bbaf3
*
*
* Copyright (c) 2016, Tiernan Cridland
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby
@mcxiaoke
mcxiaoke / KotlinParcelable
Created January 28, 2016 02:57 — forked from juanchosaravia/KotlinParcelable
How to use Parcelable in Kotlin v1.0.0-beta-4589
// ------------ Helper extension functions:
// Inline function to create Parcel Creator
inline fun <reified T : Parcelable> createParcel(crossinline createFromParcel: (Parcel) -> T?): Parcelable.Creator<T> =
object : Parcelable.Creator<T> {
override fun createFromParcel(source: Parcel): T? = createFromParcel(source)
override fun newArray(size: Int): Array<out T?> = arrayOfNulls(size)
}
// custom readParcelable to avoid reflection
@granoeste
granoeste / EachDirectoryPath.md
Last active April 4, 2024 22:32
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories