Skip to content

Instantly share code, notes, and snippets.

@amaya382
amaya382 / c87.md
Last active February 7, 2024 16:10
SublimeTextで作るお手軽Markdown文章作成環境

これはC87で頒布した部誌「OhUCC!」に寄稿した記事に若干の追記をしたものです.


SublimeTextで作るお手軽Markdown文章作成環境

0. Markdownって?

Markdownとはいわゆるマークアップ言語です. Markdownの簡単な規則に則るだけで整ったHTMLが作成できます. また, 現在ではHTMLだけではなく, LaTeXやPDFなどにも変換するアプリが提供されているため大変汎用的です. ちなみにこの文章もすべてMarkdownで書いています.

1. 最終目標

@amaya382
amaya382 / aaa---bbb.md
Last active October 8, 2023 14:49
test

afasfdaf

@amaya382
amaya382 / surfingkeys.js
Last active August 17, 2022 15:45
surfingkeys.js
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,
unmap,
iunmap,
@amaya382
amaya382 / Dockerfile
Created July 13, 2022 01:42
nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
RUN mv /etc/apt/sources.list.d /etc/apt/_sources.list.d \
&& apt update \
&& apt install -y --no-install-recommends curl \
&& apt-key del 7fa2af80 \
&& curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb \
&& dpkg -i cuda-keyring_1.0-1_all.deb \
&& mv /etc/apt/_sources.list.d /etc/apt/sources.list.d
@amaya382
amaya382 / lambda_function.py
Last active January 9, 2020 08:10
fetch and notify papers from arXiv
# based on https://www.takapy.work/entry/2019/07/15/121436
import os
import re
import json
import urllib.request
import datetime
def parse_xml(data, tag):
pattern = "<" + tag + ">([\s\S]*?)<\/" + tag + ">"
@amaya382
amaya382 / stylus.css
Created November 21, 2019 04:06
Eliminate windows fonts
@font-face {
font-family: "MS Pゴシック";
src: local("剣暎ゴシックP");
}
@font-face {
font-family: "MS ゴシック";
src: local("剣暎ゴシックP");
}
@font-face {
font-family: "メイリオ";
@amaya382
amaya382 / 90-mtrack.conf
Created September 10, 2019 22:44
/etc/X11/xorg.conf.d/
Section "InputClass"
MatchIsTouchpad "on"
Identifier "Touchpads"
Driver "mtrack"
# Acceleration and Sensitivity
Option "AccelerationProfile" "2"
Option "ConstantDeceleration" "2.4"
Option "Sensitivity" "1.35"
#!/bin/bash -eu
# Prerequisites: helm-client, kubeseal, yq, GNU grep, and GNU sed
# $1: chart
# $2: values file
# $3: chart name
cat << EOF > $1/templates/secret.yaml
apiVersion: v1
{
"editor.minimap.enabled": false,
"window.title": "${dirty}${rootName}${separator}${appName} / ${activeEditorLong}",
"editor.fontSize": 15,
"editor.fontFamily": "Karen, Menlo, Monaco, 'Courier New', monospace",
"window.zoomLevel": 0,
"go.testFlags": [
"-v"
],
"breadcrumbs.enabled": true,
@amaya382
amaya382 / Option.cs
Last active January 7, 2019 05:47
実用重視のOptionMonad"""モドキ""" in C#
//直和を表現しきれない点を気にしたら負け
public interface IOption<out T> : IEnumerable<T>
{
bool HasValue { get; }//== this.Any()
}
sealed public class Some<T> : IOption<T>
{
private readonly T val;
public bool HasValue { get { return true; } }