Skip to content

Instantly share code, notes, and snippets.

View zerone0x's full-sized avatar
❤️‍🔥
Working

zerone0x zerone0x

❤️‍🔥
Working
View GitHub Profile
@zerone0x
zerone0x / clean_code.md
Created March 30, 2022 02:42 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

var s = document.createElement('script');
s.setAttribute(
'src',
'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js'
);
s.onload = function() {
setInterval(function() {
if (!$('a[action-type="feed_list_delete"]')) {
$('a.next').click();
} else {
@zerone0x
zerone0x / ExportNetEaseMusicSongList.js
Created March 23, 2022 05:35 — forked from XueshiQiao/ExportNetEaseMusicSongList.js
导出网易云音乐歌单到 AppleMusic / Spotify 等平台
/**
* 使用方法:
* 1. 用 Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy)
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加)
* 3. 在 console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容:
Springsteen - Eric Church
Chattahoochee - Alan Jackson
Baby Now That I Found You - Alison Krauss
Check Yes or No - George Strait
@zerone0x
zerone0x / grokking_to_leetcode.md
Created March 6, 2022 05:11 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

def merge(a, b):
first_a, first_b = next(a), next(b)
while True:
if first_a == first_b:
yield first_a
first_a, first_b = next(a), next(b)
elif first_a < first_b:
yield first_a
first_a = next(a)
else:
gist is a good tool for code cheat
@zerone0x
zerone0x / 📊 Weekly development breakdown
Last active March 16, 2022 01:14 — forked from antfu/📊 Weekly development breakdown
📊 Weekly development breakdown
Python 9 hrs 23 mins ███████████░░░░░░░░░░ 52.5%
Java 2 hrs 31 mins ██▉░░░░░░░░░░░░░░░░░░ 14.1%
Markdown 2 hrs 18 mins ██▋░░░░░░░░░░░░░░░░░░ 12.9%
TeX 1 hr 50 mins ██▏░░░░░░░░░░░░░░░░░░ 10.3%
TOML 40 mins ▊░░░░░░░░░░░░░░░░░░░░ 3.8%