Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
@nemasu
nemasu / virus_scan.sh
Last active February 24, 2025 16:35
Progress for clamdscan.
#!/usr/bin/bash
function show_progress() {
echo -ne "\r"
echo -n "`echo "scale=5; ($count / $total)*100" | bc`"
}
path="/"
if [ -n "$1" ]; then
@esperecyan
esperecyan / VRChatCrossGit.cs
Last active March 14, 2021 09:38
『VRChatCrossGit.cs』 Sync two local Unity projects using Git. Put this script into “Assets/Editor” folder. / Gitを利用してローカルの2つのUnityプロジェクトを同期します。使い方: https://gitlab.com/vrc-gitcommitter/wiki/-/wikis/%E3%80%90VRChat%E3%80%91%E7%B6%99%E7%B6%9A%E7%9A%84%E3%81%AA%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%97%E3%83%A9%E3%83%83%E3%83%88%E3%83%95%E3%82%A9%E3%83%BC%…
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.ComponentModel;
using UnityEngine;
using UnityEditor;
@khibino
khibino / Yoneda.agda
Last active February 21, 2023 03:03
Yoneda Lemma Proof under Haskell like Functor
module Yoneda where
open import Function.Base using (_∘_)
open import Relation.Binary.PropositionalEquality.Core using (_≡_)
{- specialized Morphism to Haskell function,
specialized Functor to Haskell Functor,
Proof of Yoneda Lemma -}
{- 射を Haskell の関数に、
関手を Haskell の Functor に限定した場合の
@aiya000
aiya000 / Test.re
Last active September 8, 2019 09:26
会話風「キャラクター + ふきだし」 in Re:VIEW css-typesetting https://gyazo.com/163677e435eef1bcac18ca034dc1112e
= 始まり
静寂な朝。
白基調のログハウス、高さ5メートル、風がよく通った部屋。
青くて白い、春の空。
//talkright[mu-smile]{
お風呂上がったよ〜。
//}
@aiya000
aiya000 / Observable.ts
Last active July 8, 2019 05:15
Typgin NativeScript's untyped Observable
import * as Untyped from 'tns-core-modules/data/observable'
import deprecated from 'deprecated-decorator' // npm install --save-dev deprecated-decorator
import { Field } from '@/data/conditional-types'
/**
* Don't dirty your hands.
* You must use this instead of [[Untyped.Observable]].
*
* This description is [here](http://aiya000.github.io/posts/2019-07-04-recover-nativescript-type-unsafe-observable.html).
*/
@Fmajor
Fmajor / vue.ctags
Created June 19, 2019 18:20
A ctags syntax file for vue components
# A ctags syntax file for vue components
--langdef=vue
--langmap=vue:.vue
# vue-commands in <template>
--regex-vue=/^(<template>)$/\1/t,template/{scope=set}{exclusive}
--regex-vue=/^\S*(.*(v-if=|v-for=|v-show=|ref=)("[^"]*"))/\2\3/c,vue-command/{scope=ref}
--regex-vue=/^(<\/template>)$/\1//{scope=pop}{exclusive}{placeholder}
# css in <template>
--regex-vue=/^(<style.*)$/style/s,script/{scope=set}{exclusive}
--regex-vue=/^(<\/style>)$/\1//{scope=clear}{placeholder}
@aiya000
aiya000 / BasicDataExpandableListAdapter.kt
Last active February 18, 2019 05:58
Make an adapter easily than SimpleExpandableListAdapter
/**
* SimpleExpandableListAdapterのコンストラクタが受け取る引数が
* 何を言っているのか全然わからないので、
* 自然な形のやつ。
*
* @param Child CShowによって表示可能な子
* @param clever リストアップされる親と子の木
* @param CShow 子を表示する方法
*/
class BasicDataExpandableListAdapter<Child>(
#!/bin/env stack
{-
stack --resolver=lts-12.24 script --package extensible
-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GADTs #-}
@d-kuro
d-kuro / git_conflict.md
Created October 18, 2018 12:21
コンフリクトしたときの --theirs と --ours

コンフリクトしたときの --theirs と --ours

よく忘れるやつ

merge

$ git checkout branch_b
$ git merge branch_a
@HirotoShioi
HirotoShioi / Trie.hs
Created September 15, 2018 03:17
Trie tree arbitrary instance
-- |A @'Trie' a b@ is a map with keys of type @[a]@ and values of type @b@.
data Trie a b = Fork (Maybe b) (Map a (Trie a b))
deriving (Show, Eq)
instance (Ord a, Arbitrary a, Arbitrary b) => Arbitrary (Trie a b) where
arbitrary :: Gen (Trie a b)
arbitrary = sized $ \n -> if n == 0 -- We interpret the size n as maximum number of values
-- stored in the trie.
then return empty -- If the n == 0, the trie must be empty.