Skip to content

Instantly share code, notes, and snippets.

View edwinyzh's full-sized avatar

Edwin Yip edwinyzh

View GitHub Profile
@edwinyzh
edwinyzh / .gitignore
Created January 7, 2022 07:59 — forked from delphidabbler/.gitignore
General .gitignore file that I use for Delphi 7 to XE
# General .gitignore file suitable for Delphi 7 to XE
*.ddp
*.exe
*.dll
*.bpl
*.bpi
*.dcp
*.so
*.apk
@edwinyzh
edwinyzh / gist:d0af5ff0014563fc29418e3201f47e28
Created June 29, 2021 03:07 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@edwinyzh
edwinyzh / AhoCorasick.pas
Created December 9, 2020 14:35 — forked from madhurjain/AhoCorasick.pas
AhoCorasick Implementation in Delphi / Pascal
unit AhoCorasick;
interface
uses Classes, Generics.Collections;
type
ptrNode = ^TNode;
TNode = record
id: Cardinal; // Node Id for debugging
unit utokenizer;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
const
@edwinyzh
edwinyzh / TestTRawUtf8ListCreateCopyErrorPrj.pas
Created May 13, 2020 11:13
CreateCopy issue with mORMot record with a TRawUTF8List property
program TestTRawUtf8ListCreateCopyErrorPrj;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
SynCommons,
mORMot;
@edwinyzh
edwinyzh / reclaimWindows10.ps1
Created April 12, 2019 07:22 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@edwinyzh
edwinyzh / html-editors.md
Created April 3, 2019 07:30 — forked from manigandham/rich-text-html-editors.md
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

  • ProseMirror - http://prosemirror.net - supports collaborative editing, offers similar options to Mobiledoc for data structure
@edwinyzh
edwinyzh / MetaClassCache.dpr
Created February 1, 2019 15:18 — forked from gabr42/MetaClassCache.dpr
class properties as per-type cache
program MetaClassCache;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.TypInfo,
System.SysUtils;
@edwinyzh
edwinyzh / .dpr
Created October 15, 2018 06:58
The concept of batch updating with conditions - mORMot (Delphi/Pascal)
program Concept_mORMotBatchUpdateWithConditionsPrj;
uses
System.SysUtils, SynCommons, mORMot, mORMotHttpClient;
{$APPTYPE CONSOLE}
{$R *.res}
type
@edwinyzh
edwinyzh / install.sh
Created August 25, 2018 06:25 — forked from chuyik/install.sh
Bandwagon(搬瓦工) CentOS 7 安装 shadowsocks-libev 和 kcptun
######################
## shadowsocks-libev
######################
# install dependencies
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y
# install shadowsocks-libev
cd /etc/yum.repos.d/