// jQuery
$(document).ready(function() {
// code
})
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageDraw, ImageFont, ImageFilter | |
im = Image.open("./blue30.png") | |
POS = (1, 4) | |
X = POS[0] * 80 | |
Y = POS[1] * 80 | |
im1 = im.crop((X, Y, X + 30, Y + 30)) |
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We start by loading up PyICU. | |
import PyICU as icu | |
# Let's create a test text. Notice it contains some punctuation. | |
test = u"This is (\"a\") test!" | |
# We create a wordbreak iterator. All break iterators in ICU are really RuleBasedBreakIterators, and we need to tell it which locale to take the word break rules from. Most locales have the same rules for UAX#29 so we will use English. | |
wb = icu.BreakIterator.createWordInstance(icu.Locale.getEnglish()) | |
# An iterator is just that. It contains state and then we iterate over it. The state in this case is the text we want to break. So we set that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple script to search a Z39.50 target using Python | |
and PyZ3950. | |
""" | |
from PyZ3950 import zoom | |
ISBNs = ['9781905017799', '9780596513986'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageDraw, ImageFont | |
import PIL.features | |
# ! brew install libraqm | |
print('libraqm:', PIL.features.check('raqm')) | |
size = (320, 16) | |
""" | |
FORMAT = "RGB" |
https://github.com/adobe-type-tools/afdko/ Adobe Font Development Kit for OpenType
https://github.com/mpcabd/python-arabic-reshaper/ Reconstruct Arabic sentences to be used in applications that don't support Arabic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import icu | |
thkey = icu.Collator.createInstance(icu.Locale('th_TH')).getSortKey | |
words = 'ไก่ ไข่ ก ฮา'.split() | |
print(sorted(words, key=thkey)) # ['ก', 'ไก่', 'ไข่', 'ฮา'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import shlex | |
import subprocess | |
import uharfbuzz as hb | |
font_dir = 'fonts/g/mac/10.15.7/' | |
font_path = f'{font_dir}Hiragino Kaku Gothic W4.ttc' | |
font_path = f'{font_dir}Hiragino MaruGothic ProN W4.ttc' | |
font_path = f'{font_dir}Hiragino Mincho ProN.ttc' |
NewerOlder