Sync Sofa

#Sync Sofa (streaming video playback synchronizer extension)

This chrome extension allows multi-user sync streaming video in a fast, simple, and stable way.

GitHub go.mod Go version (subfolder of monorepo) Chrome web store users Uptime Robot status Uptime Robot status Uptime Robot status Uptime Robot status Uptime Robot status Uptime Robot status

English | 中文

Sync Sofa is a full-stack web extension that provides an easy-to-use and stable way to synchronize streaming playback for multiple users. It can improve the experience when users from different locations want to share a video/movie remotely. Currently, the features include:

  • 2 party connection: either party can be the host of a sync room and the other can join with connection code.
  • sync pause/play: each user pause/play the video, the other side will do the same
  • sync play process bar control: the playing time change will also affect another side user
  • local video sync: provide two ways to sync your playing of a local video file

title pic

#Current version

v1.0.9 - update on 14 Aug 2020

⚠️⚠️⚠️ Each website has it’s own controller of the playback rate, so please ignore the wrong display of playback rate.

Add:

  1. playback rate sync: any side user’s change to the playback rate will sync to the other side.

Fix:

  1. Fix bug of no new bugs

v1.0.8 - update on 8 Aug 2020

⚠️⚠️⚠️ Do Not try to use Room code like 0000 or 1234, We strongly recommend you use uncommon code so that you do not need to change it.

Add:

  1. allow customized connection code, user can directly connect to peer simply click the start button, without reapplying a new code
  2. simple built-in chat feature (can be toggled in options page)
  3. add system notification (can be toggled in options page)
  4. add connection status budge to extension icon (red-unconnected, yellow-pending connection, green-connecting)
  5. add a notification for unknown socket disconcerting
  6. add duplicate connection code notification

Fix:

  1. Fix bug of no new bugs

微信表情包

一直有个愿望希望可以做一套表情包,猫猫狗狗的,发布到微信表情商店去,然后获得一份来自陌生人的打赏。

兜兜转转,最终终于发出去了:【圆不溜Q】

QQ

Linux追加日志测试

插件监控有用到简单的文件系统,想知道写入量很大之后会不会有太大的性能问题,这样才好确定是单个日志文件(方便收集和查看)还是要多个日志文件。

Leetcode题解:分割数组的最大值

#410. 分割数组的最大值

给定一个非负整数数组和一个整数m,你需要将这个数组分成m个非空的连续子数组。设计一个算法使得这m个子数组各自和的最大值最小。

注意:
数组长度n满足以下条件:

  • 1 ≤ n ≤ 1000
  • 1 ≤ m ≤ min(50, n)

示例:

1
2
3
4
5
6
7
8
9
10
11
输入:
nums = [7,2,5,10,8]
m = 2

输出:
18

解释:
一共有四种方法将nums分割为2个子数组。
其中最好的方式是将其分为[7,2,5] 和 [10,8],
因为此时这两个子数组各自的和的最大值为18,在所有情况中最小。

Leetcode题解:戳气球

#312. 戳气球

n 个气球,编号为 0n-1,每个气球上都标有一个数字,这些数字存在数组 nums 中。

现在要求你戳破所有的气球。如果你戳破气球 i,就可以获得 nums[left] * nums[i] * nums[right] 个硬币。这里的 leftright 代表和 i 相邻的两个气球的序号。注意当你戳破了气球 i 后,气球 left 和气球 right 就变成了相邻的气球。

求所能获得硬币的最大数量。

说明:

  • 你可以假设 nums[-1] = nums[n] = 1,但注意它们不是真实存在的所以并不能被戳破。
  • 0 ≤ n ≤ 500, 0 ≤ nums[i] ≤ 100

示例:

1
2
3
4
输入: [3,1,5,8]
输出: 167
解释: nums = [3,1,5,8] --> [3,5,8] --> [3,8] --> [8] --> []
  coins = 3*1*5 + 3*5*8 + 1*3*8 + 1*8*1 = 167

博客添加搜索支持

早就想给博客加搜索功能了,但是之前忙着面试,现在面试凉了,有短暂的时间可以来做些自己的事情了,开整。

各种剧更新邮件推送

闲的无事,不想学习,做了一个小的定时脚本来检测韩剧网站的熟肉更新。因为虽然剧每周都是按日期播,但是字幕组们可能就没有那么准时了,与其自己手动刷新,不如懒(不是叫服务器帮我完成,反正服务器除了架了个插件的后台没什么别的用。

Chrome关闭深色模式

1
defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool YES

然后重启Chrome。

HashMap源码阅读

讲道理,复习面试是真的复习吐了。。。实在是复习不下去了,摸会鱼,看看HashMap的源码吧😭😭😭。