Skip to content

Instantly share code, notes, and snippets.

View yanknvim's full-sized avatar

yank.nvim yanknvim

View GitHub Profile
@yanknvim
yanknvim / README.md
Last active April 14, 2024 09:55
Boothの商品ページからIDで検索できるやつ

Booth Id Search

Boothで対応アバターなんかを検索するときに商品IDで検索することが面倒だったので、それをするボタンを追加するUserScriptです

導入

Tampermonkeyなどを導入してRawをクリーック!かんたん!

@yanknvim
yanknvim / MaterialTextureSwapper.cs
Last active April 7, 2024 00:09
あるマテリアルのテクスチャを別のマテリアルのテクスチャに置換したものを生成するエディタ拡張
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.Windows;
public class MaterialTextureSwapper : EditorWindow
{
public Material TextureSourceMaterial;
@yanknvim
yanknvim / mixxx_cue_2_txt.py
Created November 5, 2023 09:41
And script to convert cue file from Mixxx to an text
import sys
def in_the_quote(s):
return s.split('"')[1]
with open(sys.argv[1]) as f:
lines = f.readlines()
titles = [in_the_quote(line) for line in lines if "TITLE" in line]
performers = [in_the_quote(line) for line in lines if "PERFORMER" in line]
@yanknvim
yanknvim / nowplaying.py
Created May 28, 2023 09:53
今再生してるものをIntentに吐き出す
import subprocess
import webbrowser
artist = subprocess.run('playerctl -i firefox metadata -f "{{ artist }}"', shell=True, text=True, capture_output=True).stdout
title = subprocess.run('playerctl -i firefox metadata -f "{{ title }}"', shell=True, text=True, capture_output=True).stdout
url = subprocess.run('playerctl -i firefox metadata xesam:url', shell=True, text=True, capture_output=True).stdout
artist_and_title = "{0} - {1}".format(artist, title)
intent_url = "https://twitter.com/intent/tweet?hashtags=NowPlaying&text={0}&url={1}".format(artist_and_title, url)
@yanknvim
yanknvim / main.c
Created May 23, 2023 00:19
単方向リスト
#include <stdio.h>
#include <stdlib.h>
typedef struct Node {
int data;
struct Node *next;
} Node;
Node *addNode(Node *list, int data) {
Node* node = (Node*)malloc(sizeof(Node));

Keybase proof

I hereby claim:

  • I am yanknvim on github.
  • I am yanknvim (https://keybase.io/yanknvim) on keybase.
  • I have a public key ASA4wlkXFLivo_yoiHOAx_4cwQxrRgye8uuuPJCu237IRwo

To claim this, I am signing this object:

@yanknvim
yanknvim / 2023_2_init.vim
Last active February 5, 2023 09:50
2023/2/5時点のinit.vim、coc.nvimからddc.vimへの乗り換えが主な変更点
call plug#begin()
Plug 'preservim/nerdtree'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'vim-denops/denops.vim'
Plug 'Shougo/pum.vim'
Plug 'Shougo/ddc.vim'
Plug 'Shougo/ddc-ui-native'
@yanknvim
yanknvim / img2ascii.py
Last active November 15, 2022 09:46
画像をAAに変換
from PIL import Image
path = "image.png"
terminal_width = 40
image = Image.open(path)
gray = image.convert("L")