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 July 22, 2024 13:05
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 July 22, 2024 08:40
FFmpeg cheat sheet
@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active July 3, 2024 06:54 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@tiernan
tiernan / service-worker.d.ts
Last active June 3, 2024 07:00
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 July 23, 2024 09:11
[Android] How to get the each directory path.

System directories

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

External storage directories