Skip to content

Instantly share code, notes, and snippets.

@probe301
probe301 / VBAWrapText.vb
Created September 14, 2011 09:44 — forked from JoBrad/VBAWrapText.vb
[VBA] Wrap text at 69 characters, with no orphans
Private Function wrapText(text As String, Optional wrapLength As Integer) As String
Dim x As Integer, newString() As String, preSplit() As String, mySplit() As String, maxWords As Long, y As Integer, finalString As String, isEnd As Boolean
'Default wraplength to 69
If wrapLength = 0 Then wrapLength = 69
x = 0
y = 0
z = 0
'Check to see if ay wrapping should be done
If Len(text) > wrapLength Then
@probe301
probe301 / jupyter-notebook-notes
Last active February 8, 2017 08:21
Jupyter Notebook Gist
# multiple plot in grid
f, plots = plt.subplots(21, 10, sharex='all', sharey='all', figsize=(10, 21))
for i in range(203):
plots[i // 10, i % 10].axis('off')
plots[i // 10, i % 10].imshow(pat[i], cmap=plt.cm.bone)
# ===============
jupyterthemes
@probe301
probe301 / sublime-config.py
Last active February 10, 2017 05:08
Sublime Setting and Plugin Config
# 自己调试好的 Plugin Packages (folder or *.sublime-package)可以放在
# C:\Users\**\AppData\Roaming\Sublime Text 3\Packages
# 路径下, 该路径里还有个 User 文件夹
# 需要把下面两项设为 false, 否则 Sublime 更新时会给删掉
'''
// If missing packages should be automatically installed when ST starts
"install_missing": true,
// If a package was installed by Package Control (has a
@probe301
probe301 / chrome-vimium-setting
Created February 16, 2017 14:17
Chrome Vimium Setting
# Insert your prefered key mappings here.
map w scrollUp
map s scrollDown
map A goBack
map D goForward
map d nextTab
map a previousTab
map q goPrevious
map e goNext
@probe301
probe301 / default.custom.yaml
Last active June 25, 2025 07:09 — forked from lotem/default.custom.yaml
小狼毫中英文切换设置
# ascii_composer 是处理切换中英文时怎么对待当前临时编辑区字符的
# 需要找到比 toggle 更加明确的, 直接设定英文 / 中文的办法
# 中西文切換鍵的默認設置寫在 default.yaml 裏面
# 以下的 default.custom.yaml 在全局範圍重定義該組快速鍵
#
# 可用的按鍵有 Caps_Lock, Shift_L, Shift_R, Control_L, control_R
# Mac 系統上的鼠鬚管不能區分左、右,因此只有對 Shift_L, Control_L 的設定起作用
#
https://press.one/p/address/v?s=ca295f83c76f6cba4de4b9c87e2ac4d72d32156386d42a9f1d9e8ed91cb083778303224a0d6cb82cefb98cb39ce8ecb1f2543ae18c4c388abffeeb36fd98b1680&h=52154c3d8c8bc0dc2c62ba1e47bb75c4bb4c4d42e3aa5fad05888d8471006c24&a=83fcfc15ede13883486e2b66b68def67bdb19ad1&f=P1&v=2