Skip to content

Instantly share code, notes, and snippets.

@XrXr
XrXr / fudge-tabs.rb
Last active June 18, 2020 20:21
Expand tabs and remove changes that only expand tabs for use in https://github.com/ruby/ruby
#!/bin/env ruby
# Copyright (c) 2020 Alan Wu
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
@XrXr
XrXr / gist:bf5f5674fec7a4ecde4ba172192f3025
Last active July 11, 2020 22:30
Select the Japanese variant of characters with Unicode IVD selector
綾󠄀
天 <- without selector
㆝󠄀
角 <- without selector
角󠄀
@XrXr
XrXr / .vimrc
Last active September 30, 2020 21:28
vimrc
set nomodeline
set expandtab
set tabstop=8
set softtabstop=4
set shiftwidth=4
set autoindent
set smartindent
set ignorecase
set smartcase
set ruler
// Borrowing 101. Easy to see that the borrows don't overlap
// because everything is explicit and has a mapping to a
// lexical range in the source.
#[derive(Debug)]
struct NotCopy;
fn main() {
// owner (can move the value if it wants, responsible for calling destructor)
let mut obj = NotCopy {};
@XrXr
XrXr / invisible-trends.css
Created March 2, 2022 15:32
Chrome extension to hide trending topics on Twitter. Sometimes you don't want to look at news.
@XrXr
XrXr / ANSI.md
Created April 6, 2023 00:39 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27