Skip to content

Instantly share code, notes, and snippets.

View bean1310's full-sized avatar
🗾
Working from Japan

MATSUSHITA Isato bean1310

🗾
Working from Japan
View GitHub Profile
@bean1310
bean1310 / .config
Created July 31, 2022 16:38
ftraceを追うためのlinux 5.4.207 の config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.4.207 Kernel Configuration
#
#
# Compiler: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90400
@bean1310
bean1310 / universal-binary-info.py
Created December 11, 2020 16:55
Universal Binaryの情報を表示して分割するやつ.
#!/usr/bin/env python3
import sys
class FatArch:
def __init__(self, binary):
self.cpuType = binary[0:4]
self.cpuSubType = binary[4:8]
self.offset = binary[8:12]
self.size = binary[12:16]
@bean1310
bean1310 / switch_profile.sh
Created November 6, 2020 14:18
Karabiner-Elements でJIS/US配列プロファイルをキーで変更するやつ
#!/bin/bash
profiles[0]='K380'
profiles[1]='JIS'
profile_len=${#profiles[@]}
currentProfile=$('/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_cli' --show-current-profile-name)
for ((i = 0; i < $profile_len; i++)); do
if [ $currentProfile == ${profiles[$i]} ]; then
if [ $i -eq $(($profile_len - 1)) ] ; then

Keybase proof

I hereby claim:

  • I am bean1310 on github.
  • I am bean_comp (https://keybase.io/bean_comp) on keybase.
  • I have a public key ASDV00F0wrPUo-zporC7gRTqjA06yfp6ZGockZxQPtYNqAo

To claim this, I am signing this object:

@bean1310
bean1310 / mm.sh
Created January 30, 2019 08:25
ミサカ20233号(マイクラ鯖のツール)
#!/bin/bash
DEFAULT_SERVERS_DIR='/home/minecraft/MinecraftServers' # デフォルトのマイクラ鯖ディレクトリであることをミサカはコメントします.
JAVA_ARGS='-d64 -Xmx5G -Xms5G' # 本番起動時のjavaの引数である ということをミサカはコメントします.
MINECRAFT_SERVER_JAR='server.jar' # デフォルトのマイクラサーバのjarファイルであることをミサカはコメントします.
DISCORD_WEBHOOK_URL='' # DiscordのWebhookURLを指定してください. とミサカはコメントします.
new() {
echo "サーバのためのディレクトリを作る準備をミサカはします."
@bean1310
bean1310 / userChrome.css
Created January 26, 2019 11:28
Firefox Quantum のカスタマイズ
/* タブ消し */
#tabbrowser-tabs {
visibility: collapse !important;
}
/* タブの背景の非表示 */
#TabsToolbar {
visibility: collapse !important;
}
@bean1310
bean1310 / PWAじゃないTwitter.comをいい感じにするやつ.css
Last active September 14, 2018 21:00
自分が使う環境下で動くもので, 他の環境でちゃんと動くかどうかは... "Stylish"というFirefoxアドオンで動きます.
/* モーメントタブを非表示に */
div .js-moments-tab {
display: none;
}
/* 右上のTweetボタンいらないでしょ */
div .topbar-tweet-btn {
display: none;
}
@bean1310
bean1310 / .vimrc
Last active May 16, 2018 14:42
メモ
"#####表示設定#####
set number "行番号を表示する
set title "編集中のファイル名を表示
set showmatch "括弧入力時の対応する括弧を表示
syntax on "コードの色分け
set smartindent "オートインデント
set expandtab "タブを空白文字に
set tabstop=4 "画面上でタブ文字が占める幅
set shiftwidth=4 "自動インデントでずれる幅
set autoindent "改行時に前の行のインデントを継続
#!/bin/bash
# variable settings
BASEDIR=/home/minecraft/
ORIGDIR=${BASEDIR}mountPoint/
BACKUPDIR=${BASEDIR}backups/mountPoint_`date +"%m-%d_%H%M%S"`/
# Sync original directory to backup directory
rsync -rl0tcv ${ORIGDIR} ${BACKUPDIR} > ${BASEDIR}rsync.log
if [ $? = 0 ]; then
@bean1310
bean1310 / mcrestore.sh
Last active March 4, 2018 05:17
Blog:
#!/bin/bash
# Minecraft ramdisk restore
BASEDIR=/home/minecraft/
ORIGDIR=${BASEDIR}mountPoint
BACKUPDIR=${BASEDIR}backups/latest/
mount ${ORIGDIR}
if [ $? = 0 ]; then