Skip to content

Instantly share code, notes, and snippets.

Avatar
🖖
Live long and prosper!

Jang Rush weakish

🖖
Live long and prosper!
View GitHub Profile
@weakish
weakish / clip.py
Last active Jul 1, 2020
cut video
View clip.py
import ffmpy
from typing import List, Dict, Tuple
from typing_extensions import Final
def parse_time_span(s: str) -> Tuple[str, List[Dict[str, str]]]:
episode: Final[str]
time_span: Final[str]
episode, time_span = s.split(':', 1)
spans: List[str] = list(filter(lambda e: e is not '', time_span.split(',')))
@weakish
weakish / 012.md
Created Jun 16, 2020
notes on Accidental Tech #Podcast
View 012.md

https://atp.fm/12

Essentially, passwordless login systems turns every login process into a password reset process. The problems it brings in:

  1. Generally speaking, Email will be delivered, but since sending emails are queued, there will be a delay, sometimes three hours.
  2. It is not convinent on mobile devices. For example, iOS is poor at multitasking and cross application interact (note: iOS at that time, the podcast was published on May 10, 2013).
  3. People are familar with login with password, but not used to passwordless login. They may get confused.
@weakish
weakish / wording.md
Created May 23, 2020
關於正確使用涉臺宣傳用語的意見
View wording.md

《關於正確使用涉臺宣傳用語的意見》還挺長的,總體思路就是使用各種技巧避開違礙詞句。

例如:

清華大學黨委理論學習中心組在福建省廈門市開展中華人民共和國憲法專題學習

轉換爲:

北京清華大學(1)「黨委理論學習中心組」(2)在廈門市(3)開展支那地區憲制性規定(4)專題學習

@weakish
weakish / 001.md
Last active Jun 16, 2020
太医来了笔记 #podcast
View 001.md

https://taiyilaile.com/1

  1. 去性病科(皮肤科)看病的是男病人多,因为女病人在症状不明显的时候往往以为是妇科炎症,会去妇产科看,而妇产科也就帮她们看了,并不会把病人转到性病科。
  2. 大城市医生看病往往找同学。
@weakish
weakish / 001-typeface.md
Last active Jun 16, 2020
字谈字畅笔记 #podcast
View 001-typeface.md

https://www.thetype.com/typechat/ep-001/

  1. 现在的电脑字体其实都是活字。
  2. typeface 和 font 都翻译为字体。typeface 原指活字的表面(印刷时与纸接触的面),现在指抽象意义上的字体(风格、设计),而 font 则指具体的字体。当然在电脑时代,两者基本上可以混用,比如三号宋体和五号宋体在实体字体中可能是两套字体,但在电脑字体属于同一字体文件。
  3. 台湾把 typeface 翻译为字体,font 翻译为字型。
  4. 日语中活字的表面称为「字面」(typeface),而 typeface 的引申义则称为「书体」,font 则称为「フォント」。字体则指结构的差异,比如简体字、繁体字等等。

个人觉得 typeface 和 font 可以分别用日译(「书体」,强调书写风格的差异)和台译(「字型」,强调是具体的模型,可以像活字一样反复使用)。

@weakish
weakish / 02-keywoard-panic.md
Last active Jun 16, 2020
内核恐慌笔记 #podcast
View 02-keywoard-panic.md

https://pan.icu/2

  1. 法语键盘数字区默认输入符号,如果需要输入数字,需要按 shift 键。
@weakish
weakish / 02-sass.md
Last active Jun 16, 2020
疯投圈笔记 #podcast
View 02-sass.md

https://crazy.capital/2

  1. 美图秀秀用户的男女比例没有大家想象的那么悬殊,大概是 1:2.
  2. SASS 面向大型企业销售比较困难(销售流程长、公关成本高),面向中小型企业销售的问题是流失率天然会很高,因为中国中小企业平均寿命只有 3 年(这一意味着获客成本必须要低)。
View sars-2.md
@weakish
weakish / dump-to-pretty-json-file.py
Created Jan 11, 2020
Fast dump to pretty formatted JSON file.
View dump-to-pretty-json-file.py
def dump_to_pretty_json_file(thing: Any, file: TextIO) -> None:
"""Fast dump to pretty formatted JSON file."""
json.dump(thing, file,
check_circular=False, allow_nan=False,
indent=2, separators=(',', ': '))
You can’t perform that action at this time.