Skip to content

Instantly share code, notes, and snippets.

@mollifier
mollifier / zshrc_useful.sh
Last active April 9, 2024 06:29
少し凝った zshrc
# 少し凝った zshrc
# License : MIT
# http://mollifier.mit-license.org/
########################################
# 環境変数
export LANG=ja_JP.UTF-8
# 色を使用出来るようにする
@mollifier
mollifier / .zshrc_word-chars
Last active September 11, 2021 05:13
zsh で / や . も単語の区切り文字とみなす設定
# .zshrcに書く
# word-chars で指定した文字が単語の区切りとみなされる。
# M-f, M-b, ^w などの動作に影響する
autoload -Uz select-word-style
select-word-style default
zstyle ':zle:*' word-chars ' /=;@:{}[]()<>,|.'
zstyle ':zle:*' word-style unspecified
@mollifier
mollifier / rsa_encrypt.sh
Last active February 10, 2021 14:56
RSA暗号で暗号化するシェルスクリプト
#!/bin/bash
# RSA暗号で暗号化します
# 使い方
# rsa_encrypt.sh -e 公開鍵eのファイル -n 公開鍵nのファイル 平文となる数字
# 例
# rsa_encrypt.sh -n public_key/n_a.txt -e public_key/e_a.txt 4
set -e
@mollifier
mollifier / rsa_decrypt.sh
Created February 10, 2021 14:55
RSA暗号で復号化するシェルスクリプト
#!/bin/bash
# RSA暗号で復号化します
# 使い方
# rsa_decrypt.sh -d 秘密鍵dのファイル -n 公開鍵nのファイル 暗号文となる数字
# 例
# rsa_decrypt.sh -d private_key_a/d.txt -n public_key/n_a.txt 16
set -e
@mollifier
mollifier / example_tmux.conf
Created September 23, 2020 15:24
簡単なtmux.confの例
# 簡単なtmux.confの例
# プレフィックスキーをCtrl+tに変更する
unbind-key C-b
set-option -g prefix C-t
bind-key C-t send-prefix
# Ctrlを押したままウィンドウの切り替えができるようにする
bind-key C-c new-window
bind-key C-n next-window
@mollifier
mollifier / .zshrc
Last active August 16, 2020 09:51
シンプルな zshrc
# シンプルな zshrc
# License : MIT
# http://mollifier.mit-license.org/
# 環境変数
export LANG=ja_JP.UTF-8
# 補完機能を有効にする
autoload -Uz compinit
compinit
@mollifier
mollifier / vimrc_example
Last active July 18, 2020 05:43
vimrcの例
" vimrcの例
" 行番号を表示する
set number
" 現在のモードを表示する
set showmode
" 入力中のコマンドを表示する
set showcmd
@mollifier
mollifier / try_zsh.md
Last active January 10, 2019 18:07
zsh を使おう

zsh を使おう

これは2013/02/16に開催された 俺聞け4 の発表資料です。

自己紹介

名前
三宅
@mollifier
mollifier / file0.sh
Created December 11, 2012 00:08
zsh の vcs\_info に独自の処理を追加して stash 数とか push していない件数とか何でも表示する ref: http://qiita.com/items/8d5a627d773758dd8078
# vcs_info 設定
RPROMPT=""
autoload -Uz vcs_info
autoload -Uz add-zsh-hook
autoload -Uz is-at-least
autoload -Uz colors
# 以下の3つのメッセージをエクスポートする
@mollifier
mollifier / _jq
Created July 13, 2013 20:39
Completion script for jq. jq is a lightweight and flexible command-line JSON processor. http://stedolan.github.io/jq/
#compdef jq
# ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright