Skip to content

Instantly share code, notes, and snippets.

@Schwusch
Schwusch / selection_transformer.dart
Last active April 11, 2024 01:49 — forked from schultek/selection_transformer.dart
A widget that transforms the text selection when copied.
import 'package:collection/collection.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
typedef SelectionTransform = String Function(Iterable<String>);
/// A widget that transforms the text selection when copied.
///
/// This uses the [SelectionContainer] with a custom [SelectionContainerDelegate] to override the
/// [getSelectedContent] method with a custom implementation.
@lydell
lydell / .gitignore
Last active December 28, 2022 04:33
Minify Elm code
node_modules
@nurdabolatov
nurdabolatov / parallel-processing-large-file-in-python.py
Created May 8, 2021 20:30
Parallel processing large file in Python
# Source: https://nurdabolatov.com/parallel-processing-large-file-in-python
import multiprocessing as mp
import time
import os
def process_line(line):
# Count frequency for every character
counter = {}
@henry40408
henry40408 / README.md
Last active May 2, 2022 03:41
How to resolve ld: framework not found Pods_Runner?

How to resolve ld: framework not found Pods_Runner?

Environment

  • MacOS Big Sur (11.1)
  • Flutter 1.22.5 / Dart 2.10.4
  • Xcode Version 12.3 (12C33)
  • Cocoapods 1.10.1

Problem

@zetavg
zetavg / sb-calibre-azw3-kindle.md
Last active April 11, 2024 19:14
直書書籍用 Calibre 轉 azw3 在 Kindle 上跑版(翻頁相反、字體走位)的解決方法。

直書書籍用 Calibre 轉 azw3 在 Kindle 上跑版的解決方法

圖為修正後範例。

有些直書書籍轉成 azw3 後排版會跑掉,在 Kindle 上僅剩翻頁變相反、從左到右的(因為原本是直書呀)。這裡是一些解決方法。

首先對要修正的書按右鍵選編輯,然後選 AZW3

1. 直書變橫書

@matthiassb
matthiassb / dns-sync.sh
Last active March 20, 2024 12:12
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
en_BI English (Burundi)
en_AE English (United Arab Emirates)
rw_RW Kinyarwanda (Rwanda)
ast Asturian
en_SZ English (Eswatini)
he_IL Hebrew (Israel)
@stakira
stakira / tc_zhangyong1979.txt
Created December 12, 2017 01:09
常用國字標準字體表
常用國字標準字體表 (4808字)
一丁七三下丈上丑丐不丙世丕且丘丞丟並丫中串丸凡丹主乃久么之尹乍乏乎乒乓
乖乘乙九也乞乩乳乾亂了予事二于云井互五亙些亞亟亡交亦亥亨享京亭亮人仁什
仃仆仇仍今介仄以付仔仕他仗代令仙仞仿伉伙伊伕伍伐休伏仲件任仰仳份企位住
佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣作你伯低伶余佝佯依侍佳使佬供例來侃佰
併侈佩佻侖佾侏信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞倌倍倣俯倦倥俸
倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉偺偽停假偃偌做偉健偶偎
偕偵側偷偏倏傢傍傅備傑傀傖傘傭債傲傳僅傾催傷傻傯僧僮僥僖僭僚僕像僑僱億
儀僻僵價儂儈儉儒儘儔儐優償儡儲儷儼兀元允充兄光兇兆先兌克免兔兒兕兗兜兢
@hscspring
hscspring / 结巴词性标记集
Last active February 27, 2024 11:32
结巴词性对照表
- a 形容词
- ad 副形词
- ag 形容词性语素
- an 名形词
- b 区别词
- c 连词
- d 副词
- df
- dg 副语素
- e 叹词
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")