Skip to content

Instantly share code, notes, and snippets.

View musaprg's full-sized avatar
🐱
meow meow

Kotaro Inoue musaprg

🐱
meow meow
View GitHub Profile
@musaprg
musaprg / gendiff
Created January 9, 2022 19:00
vX.Y.Zという命名規則でタグ付されているやつの新しいものとひとつ前のバージョンのlatexdiffをとってくれるくん
#!/bin/bash
git tag | sort -V | tail -n 2 | xargs -n 2 bash -c 'latexdiff-vc -e utf8 --git --flatten --force -r $0 -r $1 -t CFONT main.tex'
@musaprg
musaprg / notify_discord
Last active November 29, 2021 09:34
stdinの内容をDiscordに通知するくん
#!/bin/bash
set -euo pipefail
if [ -z "$DISCORD_WEBHOOK_URL" ]; then
echo '$DISCORD_WEBHOOK_URL is not set. Please set and try again.'
exit 1
fi
if [ -t 0 ]; then
@musaprg
musaprg / benchexec
Last active November 27, 2021 09:44
本当はsudo使った方がいいけど諸事情によりsuしか使えない時にCPU-scalingを切ってベンチマークを回す君
#!/bin/bash
set -eu
if [ $# -lt 1 ]; then
echo "Usage: benchexec <your command>"
exit 1
fi
echo "Input your root password to change the CPU governor for disabling CPU-scaling."
function FindProxyForURL(url, host) {
return "SOCKS localhost:10080";
}

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@musaprg
musaprg / user.js
Last active October 22, 2019 14:53
大学の契約DBのURLに自動で遷移してくれるUserscript
// ==UserScript==
// @name Jump to Waseda Univ. Domain automatically
// @namespace musaprg
// @version 0.1.1
// @description try to take over the world!
// @author Kotaro Inoue <[email protected]>
// @match https://dl.acm.org/*
// @match https://ieeexplore.ieee.org/*
// @match https://link.springer.com/*
// @updateURL https://gist.githubusercontent.com/musaprg/0a4b58458b8cf3e7ef64770d49cfa8fd/raw/user.js
FROM jupyter/scipy-notebook
USER root
RUN apt-get update -y --fix-missing && \
apt-get -y install \
mecab \
libmecab-dev \
mecab-ipadic-utf8 \
git \
@musaprg
musaprg / script.sh
Created April 16, 2019 06:20
最新のprotocバイナリを落として/usr/local/binに置くスクリプト
curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest \
| grep "browser_download_url" \
| grep -E "protoc-[0-9.]+-linux-x86_64.zip" \
| cut -f 4 -d '"' \
| xargs -n1 curl -L -sS > protoc.zip && \
unzip protoc.zip && \
mv bin/protoc /usr/local/bin
@musaprg
musaprg / user.js
Last active May 23, 2019 08:42
AOJ-ICPCから直接AOJv2.0へ飛べるようにするスクリプト
// ==UserScript==
// @name Use AOJv2.0 in AOJ-ICPC
// @namespace musaprg
// @version 0.1.3
// @description try to take over the world!
// @author Kotaro Inoue <[email protected]>
// @match http://aoj-icpc.ichyo.jp/*
// @grant none
// @updateURL https://gist.githubusercontent.com/musaprg/0cecc3d3705e77ac9f337eb378cde894/raw/user.js
// ==/UserScript==
@musaprg
musaprg / 1.md
Created September 26, 2018 02:54
RailsとVueの環境構築

https://github.com/rails/webpacker#vue

Vue

To use Webpacker with Vue, create a new Rails 5.1+ app using --webpack=vue option:

# Rails 5.1+
rails new myapp --webpack=vue
(or run bundle exec rails webpacker:install:vue on a Rails app already setup with Webpacker).