Skip to content

Instantly share code, notes, and snippets.

View Yukaii's full-sized avatar
👾
nyan, nyan, nyan

Yukai Huang Yukaii

👾
nyan, nyan, nyan
View GitHub Profile
@jeb5
jeb5 / Youtube Subs to OPML.js
Last active April 16, 2024 18:30
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));
@akihikodaki
akihikodaki / README.en.md
Last active June 4, 2024 14:05
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@ethanhuang13
ethanhuang13 / VirtualKeyboard.swift
Last active February 7, 2024 05:58
MacBook Air M1 Zhuyin Keyboard written with SwiftUI ~=300 LOC, < 4hrs
//
// VirtualKeyboard.swift
// MacBook Air M1 Zhuyin Keyboard
// Written with SwiftUI ~=300 LOC, < 4hrs
// Created by Ethan Huang on 2021/1/13.
// Twitter: @ethanhuang13
import SwiftUI
struct VirtualKeyboard: View {
@niw
niw / README.en.md
Last active May 10, 2024 05:50
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
/* ONE LINE TOOLBAR */
#navigator-toolbox {
display: flex;
flex-direction: row-reverse;
justify-content: flex-end;
}
#titlebar {
min-width: 40px !important;
flex: 0;
@ereli
ereli / hello.go
Last active May 13, 2024 15:18
How to sign macOS and Windows executables using self-signed certificates on a Mac.
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
@jfcherng
jfcherng / st4-changelog.md
Last active April 20, 2024 00:25
Sublime Text 4 changelog just because it's not on the official website yet.
@joejag
joejag / profile.ps1
Last active October 24, 2022 03:46
Powershell profile
# Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
# Install-Module git-aliases -Scope CurrentUser -AllowClobber
# Install-Module PSReadLine -Scope CurrentUser -AllowPrerelease -Force
# Install-Module nvm -Scope CurrentUser
# Copy of the robby russell theme
function Prompt {
if ($?) {
Write-Host '➜' -NoNewline -ForegroundColor Green
}
@bbqtd
bbqtd / macos-tmux-256color.md
Last active June 1, 2024 11:51
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@ronnywang
ronnywang / points.csv
Last active September 18, 2019 14:03
We can't make this file beautiful and searchable because it's too large.
x,y,xmin,ymin,xmax,ymax
120.04444241524,23.079425783524,120.04417419434,23.079198766901,120.04471063614,23.079652800146
120.09097337723,23.091476650507,120.0908446312,23.09127926701,120.09110212326,23.091674034005
120.09626269341,23.23268044398,120.09618759155,23.232631150184,120.09633779526,23.232729737776
120.09650945663,23.232631150184,120.09644508362,23.232591715148,120.09657382965,23.232670585221
120.09575843811,23.22219022985,120.09554386139,23.22196346124,120.09597301483,23.22241699846
120.09478211403,23.218680152593,120.09477138519,23.218670292716,120.09479284286,23.218690012471
120.09228229523,23.15273091414,120.09200334549,23.152573078668,120.09256124496,23.152888749613
120.0921857357,23.090973322588,120.09217500687,23.090904238364,120.09219646454,23.091042406812
120.09240031242,23.090667378167,120.0923037529,23.090627901467,120.09249687195,23.090706854866