Skip to content

Instantly share code, notes, and snippets.

View glyh's full-sized avatar
🦎
Made with LISP

Yihang Liu glyh

🦎
Made with LISP
View GitHub Profile
@VictorTaelin
VictorTaelin / hvm_standalone.cu
Last active April 27, 2024 23:53
HVM-CUDA - First Prototype - 6.7 billion RPS
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
@joaquinicolas
joaquinicolas / gist:b7d0a0869485bca5156d0d4be87820f4
Created December 15, 2021 02:59
Setup flutter environment in arch linux
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay -S flutter
java -version
sudo pacman -S jre8-openjdk
@slavistan
slavistan / cuda-ready-archlinux-for-wsl2.md
Last active June 13, 2024 00:46
CUDA-ready Archlinux for WSL2

This is a brief guide on how to install Archlinux as a WSL2 distribution and how to set up CUDA afterwards.

As of late, Window's WSL2 offers GPU passthrough from WSL2/Linux to Windows for NVidia graphics cards which allows to run (and develop) CUDA-based applications on the WSL2/Linux-side with almost native performance. Unfortunately, the official guides for the CUDA setup for WSL2/Linux are predominantly Ubuntu-specific. Here's to you, Arch!

1. Install Archlinux

  1. Make sure that your Windows meets the dependencies and that your WSL2 is set up. See these instructions.

Archlinux is not among the default distributions available for WSL2. We'll install it from a tarball instead, a functionality offered natively by the WSL.

@vn-ki
vn-ki / Instructions.md
Last active February 29, 2024 13:48
Use ranger as chrome file chooser

Use ranger as chrome file chooser

  1. Copy the contents of kdialog to /usr/local/bin/kdialog
  2. Copy the contents of chrome_chooser.py to ~/.config/ranger/plugins/chrome_chooser.py
  3. Optionally map appropriately
  4. Run chrome with XDG_CURRENT_DESKTOP=KDE
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active June 13, 2024 08:22
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@pinge
pinge / iphone.ubuntu.md
Last active June 14, 2023 07:21
mounting iPhone storage in Ubuntu 16.04 LTS

mounting iPhone storage in Ubuntu 16.04 LTS

check if your device was recognized correctly

$ dmesg | grep ipheth
[62051.385352] ipheth 1-5:4.2: Apple iPhone USB Ethernet device attached
[62051.385437] usbcore: registered new interface driver ipheth

create mounting point and make it writable (optional)

@t184256
t184256 / example_remap.py
Created January 19, 2018 03:26
A thoroughly annotated example on keyboard remapping with evdev/uinput.
#!/usr/bin/python3
# CC0, originally written by t184256.
# This is an example Python program for Linux that remaps a keyboard.
# The events (key presses releases and repeats), are captured with evdev,
# and then injected back with uinput.
# This approach should work in X, Wayland, anywhere!
@dentechy
dentechy / WSL-ssh-server.md
Last active June 1, 2024 14:48
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@aslafy-z
aslafy-z / howto-hearthstone-archlinux.md
Last active November 4, 2022 11:17
Install Hearthstone on Archlinux

Dependencies

Installation

  • Open PlayOnLinux
@zacharycarter
zacharycarter / wclwn.md
Last active March 12, 2024 12:45
Binding to C Libraries with Nim