Skip to content

Instantly share code, notes, and snippets.

View Khang-NT's full-sized avatar

Nguyễn Triết Khang Khang-NT

View GitHub Profile
@Khang-NT
Khang-NT / 1. Explain.md
Last active May 25, 2020 08:48
YouTube Front End proxy bug

Details:

cURL command:

curl -iv --raw --http1.1 -X GET https://www.youtube.com/watch\?v\=xOv_nZra03o \
-H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36" \
-H "Cookie: YSC=SRou1098e6k; GPS=1; VISITOR_INFO1_LIVE=jAIw5VgfKQ8" \
-H "Accept-Encoding: identity" 2> response.bin 1> curl_request_log.bin
@Khang-NT
Khang-NT / example_response.md
Last active March 23, 2019 03:40
Example response of update app detail api

Every time update app detail, server will validate ALL app detail data again. If app is published and validation fail, reject this api and DON'T change database. If app not yet published, maybe accept this api and save change to database.

Example update title, response has some warnings

Update body

fun main(args: Array<String>) {
val inputs = arrayOf(
"Hello"
)
for (i in inputs) {
println("==> $i")
println(i.toByteArray().joinToString(", "))
}
}
[
{"csn":"PKm0W7eiE4i51AaMwaSYBw","page":"watch","rootVe":3832},
{"preconnect":["https:\/\/r5---sn-ci5gup-qxas.googlevideo.com\/generate_204","https:\/\/r5---sn-ci5gup-qxas.googlevideo.com\/generate_204?conn2"],"page":"watch"},
{"page":"watch","player":{"html5":true,"params":{"bgcolor":"#000000","allowfullscreen":"true","allowscriptaccess":"always"},"assets":{"js":"\/yts\/jsbin\/player-vflB24EJ3\/en_US\/base.js","css":"\/yts\/cssbin\/player-vflecdMa_\/www-player-webp.css"},"sts":17806,"url":"","args":{"relative_loudness":"3.52099990845","allow_embed":"1","view_count":"971453609","vss_host":"s.youtube.com","ad_preroll":"1","iurlsd":"https:\/\/i.ytimg.com\/vi\/aJOTlE1K90k\/sddefault.jpg","allow_html5_ads":"1","fade_in_duration_milliseconds":"1000","show_content_thumbnail":true,"sffb":true,"atc":"a=3\u0026b=N1DhMd7KtIdu_FuCjLMhCYk4ECI\u0026c=1538566460\u0026d=1\u0026e=aJOTlE1K90k\u0026c3a=25\u0026c1a=1\u0026c6a=1\u0026hh=BCLe22P63OpCwFQjkgo-cXH3kns0LKjUmD0VS0W1t9A","hl":"en_US","ad_logging_flag":"1","csi_page_ty
package com.google.android.exoplayer2.demo;
import android.support.annotation.Nullable;
import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.Timeline;
import com.google.android.exoplayer2.source.DeferredMediaPeriod;
import com.google.android.exoplayer2.source.DynamicConcatenatingMediaSource.DeferredTimeline;
import com.google.android.exoplayer2.source.MediaPeriod;

Overrview

YMusic is a streaming music app with multiple content provider:

  • Local music provider: browse/play music files in your phone storage.
  • YouTube music provider: browse/stream/download music (video) from YouTube.
  • More...

Hiện tại e cần thiết kế lại UI/UX phần play nhạc từ YouTube, gồm những screen ở dưới (những screen khác e có thể reuse designed component của những screen này).

Thay đổi chính so với app hiện tại:

  • Sẽ có now playing screen riêng cho online music (YouTube), hiện tại offline và online music dùng chung 1 now playing screen. Cụ thể ở dưới.
Server Error in '/' Application.
Transaction (Process ID 592) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Transaction (Process ID 592) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Source Error: