Skip to content

Instantly share code, notes, and snippets.

View djkskqyr3's full-sized avatar

James Chan djkskqyr3

View GitHub Profile
@djkskqyr3
djkskqyr3 / AdbCommands
Created June 29, 2024 10:13 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@djkskqyr3
djkskqyr3 / README.md
Created January 6, 2022 20:13 — forked from gabrielemariotti/README.md
A SectionedGridRecyclerViewAdapter: use this class to realize a simple sectioned grid `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned grid RecyclerView.Adapter without changing your code.

Screen

The RecyclerView has to use a GridLayoutManager.

This is a porting of the class SimpleSectionedListAdapter provided by Google

If you are looking for a sectioned list RecyclerView.Adapter you can take a look here

@djkskqyr3
djkskqyr3 / Readme.md
Created January 6, 2022 20:12 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

@djkskqyr3
djkskqyr3 / gist:4c1160a32c77ad332f1c69748f3e420c
Created December 8, 2021 20:46 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@djkskqyr3
djkskqyr3 / mediastream-I420A-to-I420-converter.js
Created November 23, 2021 02:10 — forked from saravanannkl/mediastream-I420A-to-I420-converter.js
Media stream video frame I420A to I420 converter
// Based on https://web.dev/mediastreamtrack-insertable-media-processing/
// Uses Webcodecs API, which is supported only in Chrome as of November 2021
function convertI420AFrameToI420Frame(frame) {
const { width, height } = frame.codedRect;
// Y, U, V, Alpha values are stored sequentially. Take only YUV values
const buffer = new Uint8Array(width * height * 3);
frame.copyTo(buffer, { rect: frame.codedRect });
const init = {
timestamp: 0,
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
@djkskqyr3
djkskqyr3 / BackgroundTransferSample.swift
Created September 11, 2020 11:17 — forked from toddhopkinson/BackgroundTransferSample.swift
Upload Very Large Files In Background on iOS - Alamofire.upload multipart in background
// You have a very very large video file you need to upload to a server while your app is backgrounded.
// Solve by using URLSession background functionality. I will here use Alamofire to enable multipart upload.
class Networking {
static let sharedInstance = Networking()
public var sessionManager: Alamofire.SessionManager // most of your web service clients will call through sessionManager
public var backgroundSessionManager: Alamofire.SessionManager // your web services you intend to keep running when the system backgrounds your app will use this
private init() {
self.sessionManager = Alamofire.SessionManager(configuration: URLSessionConfiguration.default)
self.backgroundSessionManager = Alamofire.SessionManager(configuration: URLSessionConfiguration.background(withIdentifier: "com.lava.app.backgroundtransfer"))
@djkskqyr3
djkskqyr3 / example.m
Created September 11, 2020 11:17 — forked from Kozlov-V/example.m
upload task in background using afnetworking + progress
Use:
NSURLSessionConfiguration:backgroundSessionConfiguration:
instead of
NSURLSessionConfiguration:defaultSessionConfiguration
From the NSURLSessionConfiguration:backgroundSessionConfiguration: documentation:
Upload and download tasks in background sessions are performed by an external daemon instead of by the app itself. As a result, the transfers continue in the background even if the app is suspended, exits, or crashes.
So in your case, change: