Skip to content

Instantly share code, notes, and snippets.

View Xuyuanp's full-sized avatar
💭
I may be slow to respond.

Xuyuan Pang Xuyuanp

💭
I may be slow to respond.
  • Beijing
View GitHub Profile
@james2doyle
james2doyle / levenshtein.lua
Last active November 24, 2022 21:52 — forked from Badgerati/levenshtein_algorithm.lua
An implementation of the Levenshtein distance algorithm in Lua
-- Returns the Levenshtein distance between the two given strings
-- Lower numbers are better
local function levenshtein(str1, str2)
local len1 = #str1
local len2 = #str2
local matrix = {}
local cost = 1
local min = math.min;
-- quick cut-offs to save time
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@thirteen37
thirteen37 / pixel-arch.md
Last active June 6, 2020 07:47
Installing Arch on the Chromebook Pixel

This describes my basic Arch Linux installation on my Chromebook Pixel.

Note: I'm a coward, so I installed Arch to an SD card instead of wiping out the existing SSD.

Requirements

  • SD card. A very minimal Arch installation with XFCE will need about 2GB, so I think 4GB is the minimum you can get by with.
  • Arch installer on a USB drive. The 2013.05.01 is broken with the recent netctl change. So either get an older or newer one.
  • Some Arch Linux familiarity.
  • Time, patience, and good eyesight.
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik