Skip to content

Instantly share code, notes, and snippets.

View tuxedocat's full-sized avatar
🐈‍⬛
WFH with cats

yu-s tuxedocat

🐈‍⬛
WFH with cats
View GitHub Profile
@tuxedocat
tuxedocat / lima_docker_rootless.yaml
Last active February 21, 2023 17:07
lima-vm setting: Rootless docker with both TCP/UNIX Socket connection (I personally use this setting for buildpacks)
# Example to use Docker instead of containerd & nerdctl
# $ limactl start ./lima_docker_rootless.yaml
# $ limactl shell lima_docker_rootless docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=unix://$HOME/docker.sock
# $ docker ...
# This example requires Lima v0.7.3 or later
# CPUs: if you see performance issues, try limiting cpus to 1.
@tuxedocat
tuxedocat / levd.py
Last active October 20, 2022 18:30
compute levenshtein distance
import numpy as np
from numba import jit
def levenshtein(x, y):
""" levenshtein distance for iterable sequences
"""
# check type
if (np.all(map(type, x)) is str) and (np.all(map(type, y)) is str):
_x = np.array(x, dtype=np.str)
@tuxedocat
tuxedocat / nord-vimium.css
Last active October 13, 2022 04:50 — forked from mikowl/nord-vimium.css
Nord Vimium Theme
/* Nord Vomnibar CSS */
/* Installation: Open Vimium Options -> Click "Show Advanced Options" and paste this into the CSS for Vimium UI text area. */
/* Nord Colors
#2e3440
#3b4252
#434c5e
#4c566a
#d8dee9
@tuxedocat
tuxedocat / CityLights.icls
Last active September 21, 2022 17:01
[WIP] City Lights Color Scheme for IntelliJ IDEA: manually ported from https://github.com/Yummygum/city-lights-syntax-vsc
<scheme name="CityLights" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2019-01-04T13:46:48</property>
<property name="ide">Idea</property>
<property name="ideVersion">2018.3.2.0.0</property>
<property name="modified">2019-01-04T13:46:55</property>
<property name="originalScheme">CityLights</property>
</metaInfo>
<colors>
<option name="ADDED_LINES_COLOR" value="a3be8c" />
@tuxedocat
tuxedocat / Pok3r-macOS-_Karabiner-fn_.kbd.json
Last active June 28, 2020 04:24
Pok3r macOS (Karabiner fn)
[
{
"name": "Pok3r macOS (Karabiner fn)",
"author": "tuxedocat",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX3A-L1xx"
},
[
{
[
{
"name": "Pok3r Default",
"author": "tuxedocat"
},
[
{
"y": 1.5,
"c": "#242b2b",
"t": "#bfbfbf",
body {
background: #2e3440;
color: #4c566a;
}
div.title {
color: #d8dee9;
}
.qs_input {
background: #3b4252;
color: #d8dee9;
#2E3440,#3B4252,#88C0D0,#2E3440,#3B4252,#D8DEE9,#A3BE8C,#81A1C1
#1D252C,#4c566a,#28313A,#70e1e8,#28313A,#B7C5D3,#5ec4ff,#e2728d
#!/bin/bash
cd
sudo xcodebuild -license
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
## Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git tig vim zsh wget pyenv zplug sqlite xz coreutils
brew cleanup -s