Skip to content

Instantly share code, notes, and snippets.

View phoenixenero's full-sized avatar

Phoenix C. Enero phoenixenero

View GitHub Profile
@phoenixenero
phoenixenero / stats.py
Last active October 5, 2021 13:14
pretty stats for Japanese Support Anki 2.1 Add-on
# -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# Used/unused kanji list code originally by 'LaC'
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
import unicodedata
from anki.hooks import addHook
from anki.utils import ids2str, splitFields
from aqt import mw
from aqt.webview import AnkiWebView
@phoenixenero
phoenixenero / how-to-color.md
Last active October 20, 2023 14:40
How to color manga pages

How to color manga pages

A very opinionated guide by icrawler.

This guide is very opinionated and you don't need to follow the exact steps I outline here.

This has been written for desktop but most of the concepts here apply to many editors as well.

For the programs, you can use pretty much any well-featured photo-editing/digital art program. Those that include:

@phoenixenero
phoenixenero / reference.md
Last active August 9, 2016 06:16
Lilia, a language that compiles to Lua

Notes

This document uses Lua's variation of the notation for Extended Backus-Naur Form (EBNF).

Language support

Lilia guarantees support for Lua 5.1, 5.2, and 5.3. That means you can use any

@phoenixenero
phoenixenero / lilia code.lya
Created August 6, 2016 08:34
Thoughts about Lilia, a language that compiles to Lua
-- These are random scattered thoughts about this hypothetical language. I did
-- my best to make it "Lua-y". Ideally most existing Lua code should compile to
-- near-equivalent code.
-- Wrap print function so that it also returns what was passed
local _pr
do
old_print = print
function _pr(...) do
old_print(...)
@phoenixenero
phoenixenero / lazygulpif.js
Last active December 21, 2015 06:19
Creates a new anonymous function that when called, returns a new gulp-if pipe.
// This returns an anonymous function that returns a new gulp-if pipe
// https://github.com/OverZealous/lazypipe#using-with-more-complex-function-arguments-such-as-gulp-if
function lazygulpif( condition, pipeFunction, args ) {
args = ! args ? [] : args;
args = args.constructor === Array ? args : [ args ];
return function() {
return gulpif( condition, pipeFunction.apply( this, args ) );
};
}
@phoenixenero
phoenixenero / get-available-chars.rb
Last active December 7, 2015 08:23
Get available chars
#!/usr/bin/env ruby
require 'optparse'
# Get available characters
#
# Written by Phoenix Enero.
#
# It takes a font input in OTF/TTF format and returns a text file with the
# cmap.
@phoenixenero
phoenixenero / get-available-chars.rb
Created December 6, 2015 10:22
[RUBY] Get all available characters in a .WOFF font
#!/usr/bin/env ruby
require 'optparse'
# Get available characters
#
# Written by Phoenix Enero.
#
# It requires:
# - `woff2sfnt` command-line tool. It can be installed through
# `apt-get install woff-tools` in Ubuntu/Debian.
@phoenixenero
phoenixenero / build.lua
Created August 27, 2015 10:30
Lazy _s (underscores) theme generation with Lua. Tested in Windows only. Needs the `_s` dist folder in the same directory as build.lua
-- Written by Phoenix Enero. MIT License. Sorry for bad english
-- Global Config
local os = 'windows' -- 'unix'
local settings = {
-- note: must be contained in single quotes
text_domain = "'megatherium'",
function_names = 'megatherium_',
text_domain_style = 'Text Domain: megatherium',
docblocks = ' Megatherium',
@phoenixenero
phoenixenero / Natural-color-shades-and-tints.markdown
Created February 1, 2015 09:18
Natural color shades and tints

Natural color shades and tints

An experiment on natural color shades. NOTE: doesn't work with pure gray tones at the moment.

A Pen by Phoenix Enero on CodePen.

License.