Skip to content

Instantly share code, notes, and snippets.

View harrifeng's full-sized avatar

Harri Feng harrifeng

View GitHub Profile
@harrifeng
harrifeng / redhat-compile-emacs.sh
Last active April 1, 2024 13:15
Compile emacs on redhat and centos
yum -y groupinstall "Development Tools"
yum -y install gtk+-devel gtk2-devel
yum -y install libXpm-devel
yum -y install libpng-devel
yum -y install giflib-devel
@harrifeng
harrifeng / README.md
Created November 24, 2022 15:23 — forked from tknerr/README.md
Vagrant with Ansible Provisioner on Windows

Vagrant with Ansible Provisioner on Windows

Long story short, ansible does not work on a Windows control machine, so you basically have to:

  • either run ansible --connection=local ... in the target vm
  • set up a separate control vm where ansible is installed via shell provisioner

Below are Vagrantfile examples for both approaches

Within the Target VM

curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
#!/bin/bash
yum install epel-release -y
yum install snapd -y
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
@harrifeng
harrifeng / ctrl_h_del.lua
Created January 5, 2022 08:09
Mac ctrl +h to delete
hs.hotkey.bind({"ctrl"}, "h", function()
hs.eventtap.keyStroke('', 'delete')
end)
@harrifeng
harrifeng / multi_emacs_config.org
Created April 29, 2021 03:36
multi emacs config

Install Doom alongside other configs (with Chemacs2)

Chemacs2 is a bootloader for Emacs. It allows you to switch between multiple Emacs configurations. Here is a quick guide for setting it up with Doom Emacs as the default config:

  1. First, install Doom somewhere:
    git clone https://github.com/hlissner/doom-emacs ~/doom-emacs
    ~/doom-emacs/bin/doom install
        
中英文字体名对照表(包括方正、文鼎),中英文方正
在CSS文件中,我们常看到有些字体名称变成了乱码,这是由于编写者将中文字体的名字直接写成了中文,为了避免这种状况出现,在CSS文件中使用中文字体时,最好使用中文字体的英文名称,需要的朋友可以注意下
新細明體 PMingLiU
細明體 MingLiU
標楷體 DFKai-SB
黑体 SimHei
宋体 SimSun
新宋体 NSimSun

Feature 103

This feature was previsouly created for old users. Recently, all the old users had already join new group.

Owner

Ada John

>>> import sys
>>> sys.maxsize
9223372036854775807

3.5.8.1 Pattern Matching

3.5.8.1 Pattern Matching

  • Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not occur in a pattern. A backslash escapes the following character; the escaping backslash is discarded when matching. The special pattern characters must be quoted if they are to be matched literally.
  • The special pattern characters have the following meanings:
    • *