Skip to content

Instantly share code, notes, and snippets.

View samcv's full-sized avatar

Samantha McVey samcv

  • Amsterdam, Netherlands
View GitHub Profile
@wbsch
wbsch / on-modify.timetrack.py
Last active November 10, 2021 21:17
Time tracking hook script for Taskwarrior that outputs ledger timelog formatted data.
#!/usr/bin/env python
#
# Writes task start/stop times to a timelog formatted file.
# You might need to adjust LEDGERFILE, or set the TIMELOG environment variable.
#
# Example reports, after using start/stop on a task:
# ledger -f /path/to/timelog.ledger print
# ledger -f /path/to/timelog.ledger register
#
# Projects, tags, and UUIDs are fully supported and queryable from ledger.
@AlexDaniel
AlexDaniel / save-me-from-texas.creole
Last active March 14, 2017 01:01
Save me from Texas

⚠⚠⚠⚠⚠⚠⚠ ↓↓↓ PAGE MOVED ↓↓↓ ⚠⚠⚠⚠⚠⚠⚠

I moved this page to rakudo wiki. A lot of people wanted to add stuff, but gists are not editable. A wiki is a more appropriate place for this kind of stuff. Rakudo wiki is possibly not the best place for it, but for now that will do.

Plus, GitHub gists totally suck when unicode characters are involved. There's also no preview option here. So I'm glad that it is being moved.

⚠⚠⚠⚠⚠⚠⚠ ↑↑↑ PAGE MOVED ↑↑↑ ⚠⚠⚠⚠⚠⚠⚠

Recently Perl 6 got support for various unicode characters (½ ¹ ∞ × ÷, see this link for a full list), but I don't think that we are done. Here is a list of things to think about.

# Gets a string from a Unicode codepoint or other name
sub getstrfromname ( str $name ) {
my int $cp := nqp::codepointfromname($name);
return $cp < 0 ?? "" !! nqp::chr($cp);
}

Sorted table

This is part of my brainstorming for how to go from codepoint numbers to rows in the bitfield that store the property data for each codepoint. Due to there being hundreds of thounsands of codepoints, we cannot just store an array that stores hundreds of thousands of items.

sorted_table

Meaning of this table explained in the pseudocode below.

low high bitfield_row miss
14 27 0 14
@samcv
samcv / eco.md
Last active April 18, 2017 11:28

FAIL 18

DateTime::Math

  • Log
  • Reported
  • Fixed

DateTime::Utils