Skip to content

Instantly share code, notes, and snippets.

@saikiran91
saikiran91 / BaseUpdateCheckActivity.kt
Last active May 12, 2022 17:13
Android officially announced the in-app updates. https://developer.android.com/guide/app-bundle/in-app-updates. This is the code sample for handling both IMMEDIATE and FLEXIBLE updates in a single activity; Kotlin way.
import android.app.Activity
import android.content.Intent
import android.content.IntentSender
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import com.google.android.material.snackbar.Snackbar
import com.google.android.play.core.appupdate.AppUpdateManager
import com.google.android.play.core.appupdate.AppUpdateManagerFactory
@subfuzion
subfuzion / curl.md
Last active May 3, 2024 09:26
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@danfinlay
danfinlay / How to download streaming video.md
Last active March 23, 2024 03:32
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@NapoleonWils0n
NapoleonWils0n / ffmpeg combine files.sh
Created November 4, 2012 00:26
ffmpeg: combine seperate audio and video files into a single video
#!/bin/sh
# ffmpeg combine seperate audio and video files into a single video
# copy the audio and video tracks
ffmpeg -i audio.aiff -i video.mov -acodec copy -vcodec copy -f mp4 avcombined.mp4
# encode the audio as aac and copy the video track without encoding it. if its the h264 codec
ffmpeg -i audio.aiff -i video.mov -acodec libfaac -ac 2 -ar 48000 -ab 160k -vcodec copy -f mp4 avcombined.mp4