Skip to content

Instantly share code, notes, and snippets.

View kartdroid's full-sized avatar

Karthick Chinnathambi kartdroid

View GitHub Profile
@kartdroid
kartdroid / machine.js
Created November 28, 2022 15:56
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@kartdroid
kartdroid / machine.js
Last active November 28, 2022 15:55
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
@kartdroid
kartdroid / apk_to_jar.md
Last active July 11, 2024 02:33
APK to JAR conversion

Using apktool

  • Use Extractor APK to downlaod the APK

      It will be downloaded in /sdcard/ExtractedApks
  • Use apktool to extract the APK

@kartdroid
kartdroid / 01_m3u8-to-mp4.md
Last active January 2, 2024 22:48 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@kartdroid
kartdroid / m3u8.md
Created June 12, 2022 17:42 — forked from primaryobjects/m3u8.md
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.

1. Store api keys in a xml file

Put xml file "api_keys.xml" in the directory "res/value/".

api_keys.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>
https://github.com/google/ExoPlayer/commit/36f5c0c4ee06cffc86c8fd2fff65191f1a801ed4
https://docs.google.com/document/d/1z9qwuP7ff9sf3DZboXnhEF9hzW3Ng5rfJVqlGn8N38k
@kartdroid
kartdroid / flatten_obj.txt
Created January 7, 2020 10:49
Javscript Puzzles
Task:
Write a function(flattenObject) which transform JS Object structure.
All nested keys will form one array element.
For object {“employee”: { “name”: {“first”: “A”, “last”: “B”} }, “age”: 30, knownLanguages: [“Telugu”, “English”]}
The ending keys in the object are first, last, age, knownLanguages => which means the output should have an array with four elements each one having key and value pairs.
key should have the object nested path (as array). For first the nested path is [employee,name,first] and value as “A” and for last nested path is [employee,name,last] and value as “B”.
@kartdroid
kartdroid / oauth2.0.md
Last active January 10, 2022 01:20
oauth2.0

About OAUTH 2.0

OAuth 2.0 is the industry-standard protocol for authorization.
OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices.

Role Players

  1. Resource Owner (RO) - Entity capable of granting access to