Skip to content

Instantly share code, notes, and snippets.

View HughP's full-sized avatar

HughP HughP

View GitHub Profile
from unicodedata import *
script_data = {
"names":['Common', 'Latin', 'Greek', 'Cyrillic', 'Armenian', 'Hebrew', 'Arabic',
'Syriac', 'Thaana', 'Devanagari', 'Bengali', 'Gurmukhi', 'Gujarati', 'Oriya',
'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhala', 'Thai', 'Lao', 'Tibetan',
'Myanmar', 'Georgian', 'Hangul', 'Ethiopic', 'Cherokee', 'Canadian_Aboriginal',
'Ogham', 'Runic', 'Khmer', 'Mongolian', 'Hiragana', 'Katakana', 'Bopomofo',
'Han', 'Yi', 'Old_Italic', 'Gothic', 'Deseret', 'Inherited', 'Tagalog',
'Hanunoo', 'Buhid', 'Tagbanwa', 'Limbu', 'Tai_Le', 'Linear_B', 'Ugaritic',
@HughP
HughP / 20. February 2015 brew list
Created February 20, 2015 20:08
20. February 2015 brew list
$ brew list
atk fontconfig giflib icu4c libgeotiff little-cms2 osxfuse readline
autoconf freetype git imagemagick libiconv lzlib pango sqlite
automake freexl glib intltool liblwgeom m4 php55 unixodbc
bison gcc gmp isl libmpc makedepend pillow vassh
brew-cask gdal gobject-introspection jhove2 libpng mercurial pixman webp
cairo gdbm gpp jpeg libspatialite meta-extractor pkg-config wget
cloog gdk-pixbuf gtk+ jq libtiff mpfr proj wp-cli
composer geos gzip json-c libtool node python xz
flex gettext harfbuzz libffi libxml2 openssl python3 zlib
@HughP
HughP / 20. February 2015 pip list
Created February 20, 2015 20:10
20. February 2015 pip list
$ pip list
basemap (1.0.7)
cairocffi (0.6)
CairoSVG (1.0.11)
cffi (0.8.6)
colour (0.0.6)
cssselect (0.9.1)
Cython (0.22)
GDAL (1.11.1)
lxml (3.4.2)
@HughP
HughP / UAX_29.py
Created March 30, 2015 06:10
PyICU
# 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.
@HughP
HughP / index.html
Last active January 18, 2024 16:50 — forked from wilson428/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>The Word Stone</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="canvas" id="canvas"></div>
<div id="wordlist" class="wordlist"></div>
@HughP
HughP / index.html
Last active August 29, 2015 14:22 — forked from andrewberls/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bash Command Visualization</title>
<style type="text/css">
* { margin: 0; padding: 0; }
#chart {
##Add shebang
# Validate syntax
#Make version numbers skipped so that updates don't kill the script.
##Wordpress
wget https://wordpress.org/latest.zip
##Wordpress Tools
#WP-CLI
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
@HughP
HughP / wordpress_install.sh
Created February 6, 2017 19:31 — forked from bugsysop/wordpress_install.sh
Script for installing the latest version of WordPress plus a number of useful plugins.
#!/bin/sh
#
# Instant Wordpress!
# ------------------
# Script for installing the latest version of WordPress plus a number of useful plugins.
# Source : https://github.com/snaptortoise/wordpress-quick-install
#
#
# Latest version of WP
@HughP
HughP / wordpress_install.sh
Created February 6, 2017 19:32 — forked from bugsysop/wordpress_install.sh
Script for installing the latest version of WordPress plus a number of useful plugins.
#!/bin/sh
#
# Instant Wordpress!
# ------------------
# Script for installing the latest version of WordPress plus a number of useful plugins.
# Source : https://github.com/snaptortoise/wordpress-quick-install
#
#
# Latest version of WP
@HughP
HughP / context.json
Created April 19, 2017 04:59 — forked from edsu/context.json
A strawman example of encoding a Dublin Core Application Profile as JSON-LD context object.
{
"@id": "http://example.com/app-profile.json",
"@context": {
"title": "http://purl.org/dc/terms/title",
"description": "http://purl.org/dc/terms/description",
"creator": "http://purl.org/dc/terms/creator"
},
"title": "JSON-LD Dublin Core Application Profile",
"description": "This is an example of a Dublin Core Application Profile as a JSON-LD. The point is to demonstrate that a JSON-LD context document could contain metadata. If it is desirable to annotate the use of particular properties they could theoretically fit into @graph using existing or a new DCAP vocabulary, etc.",
"creator": "http://twitter.com/edsu",