Skip to content

Instantly share code, notes, and snippets.

Avatar
☢️
3.6 roentgen, not great, not terrible.

Jack Cherng jfcherng

☢️
3.6 roentgen, not great, not terrible.
View GitHub Profile
@jfcherng
jfcherng / Symbol List - Heading.tmPreferences
Last active Sep 7, 2020
ST 4083 Markdown headings beautifying
View Symbol List - Heading.tmPreferences
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>text.html.markdown markup.heading - meta.whitespace.newline.markdown</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
@jfcherng
jfcherng / st4-kind-scope-relationship
Last active Jul 30, 2020
ST 4 Autocompletion: Kind <---> Scope relationship
View st4-kind-scope-relationship
https://discord.com/channels/280102180189634562/280157067396775936/736233105295278120
keyword:
keyword
storage.modifier
storage.type
keyword.declaration
variable.language
constant.language
type:
@jfcherng
jfcherng / .python-version
Last active Jul 20, 2020 — forked from Westacular/markdown_reference_completions.py
Sublime Text 4 autocomplete plugin for Markdown reference links (Python 3.8 required)
@jfcherng
jfcherng / .env
Created Jun 9, 2020
Symfony 5 maintenance mode
View .env
MAINTENANCE_MODE=0
@jfcherng
jfcherng / CompletionItemDemo.py
Last active Jun 8, 2020
Sublime Text 4 demo: CompletionItem (Min ST version: 4073)
View CompletionItemDemo.py
import sublime
import sublime_plugin
# @see https://discordapp.com/channels/280102180189634562/280157067396775936/697124502244687984
class CompletionItemDemoListener(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
return (
[
sublime.CompletionItem(
@jfcherng
jfcherng / st4-changelog.md
Last active Sep 21, 2020
Sublime Text 4 changelog just because it's not on the official website yet.
View st4-changelog.md

Converted via https://domchristie.github.io/turndown

About Sublime Text 4

ST 4 is currently under private alpha for power users to test and report issues to let the dev team make it polished before it gets publicly announced. It has been almost under alpha for 8 months already and it's actually kind of stable for daily use now. If you have a ST 3 license, you can join the offical ST Discord chat server to download and test it. And the most important thing, report issues you encoutered so ST 4 can become better. I hope people can interact with the dev team more so I don't directly put download links here but maybe you are smart enough to guess them :)

Dev Channel Changelog

@jfcherng
jfcherng / SimpleCrypto.php
Created Oct 26, 2019
Yet another simple encryption/decryption wrapper.
View SimpleCrypto.php
<?php
declare(strict_types=1);
namespace App\Core;
use RuntimeException;
class SimpleCrypto
{
@jfcherng
jfcherng / sublime.py
Last active Jul 14, 2020
sublime.py - patched for v3211
View sublime.py
import sys
import sublime_api
class _LogWriter:
def flush(self):
pass
def write(self, s):
@jfcherng
jfcherng / regex-expand.py
Created Aug 5, 2019
Expand compacted regex expression
View regex-expand.py
import functools
import os
import re
import sys
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
# https://github.com/asciimoo/exrex
import exrex
@jfcherng
jfcherng / ChtStroke.php
Last active Aug 7, 2019 — forked from blackbing/big5_stroke.tab
中文筆劃排序(只適用繁體中文) for PHP 7.2
View ChtStroke.php
<?php
/**
* Author: blackbing@gmail.com
* Desc: 為了解決中文筆劃排序的問題(只適用繁體中文)
* php 可以直接執行 cht_strokesort.
*/
final class ChtStroke
{
const BIG5_HB_MIN = 0x81; // 高位元組最小值
You can’t perform that action at this time.