Skip to content

Instantly share code, notes, and snippets.

View sho-t's full-sized avatar
🎆
Life is Japanese sparklers.

sho90 sho-t

🎆
Life is Japanese sparklers.
View GitHub Profile
@psprint
psprint / deploy-message.zsh
Last active April 1, 2023 07:46
Zsh function to display a message under prompt
# The Zshell function will display the given message under-prompt (as a kind of notification).
# It has an optional delay first argument: "@sleep:<secnods with fractions>". If given, then
# the message will wait in background before showing for the specified time.
#
# Usage:
# deploy-message @msg "Hello world"
# deploy-message "Hello world"
# deploy-message @msg 1234 # I.e. the "@msg" is needed for number-only messages, otherwise optional
# deploy-message @sleep:5.5 "Hello world"
" vim: set ff=unix tabstop=4 shiftwidth=0 softtabstop=-1 noexpandtab fileencoding=utf-8 fileformat=unix filetype=vim foldmethod=marker :
" https://gist.github.com/kotashiratsuka/eac44d7e569f3721be5a12b8c221cab6
" 基本コンセプト
" * scp1ファイルで環境移行済ます
" * mac/win/linux/ios環境依存しない、エラーが出ない
" * 自分以外の人が触っても混乱しないようにする(rootで複数人が使う場合などに配慮)
" * プラグインは極力使わない、プラグインは補助輪と割り切る、どうせ数年立ったら使わなくなる
" * プラグイン強化するくらいならその分vimの標準操作を速くできるように頭と指を鍛える
" * tips混じってるけど気にしない
@voluntas
voluntas / react.rst
Last active May 25, 2022 11:57
React コトハジメ

React コトハジメ

日時:2017-01-02
作:@voluntas
バージョン:2.1.0
URL:https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@mono0926
mono0926 / commit_message_example.md
Last active July 8, 2024 01:52
[転載] gitにおけるコミットログ/メッセージ例文集100
@miyakogi
miyakogi / config.md
Last active February 8, 2024 08:57
JSON, YAML, ini, TOML ざっくり比較
@naokazuterada
naokazuterada / reset_rebase.sh
Last active May 15, 2024 05:40
git rebaseを間違えた時に元に戻す
git reflog
# これで、以下の様なのが参照できる
2be6f11 HEAD@{0}: xxxxxxxxxxxx
18389ad HEAD@{1}: xxxxxxxxxxxxx
0c485c8 HEAD@{2}: xxxxxxxxxxxxxx
b751438 HEAD@{3}: xxxxxxxxxxxxxxx # ここに戻したいので一つ前の数字を指定↓
hc8a0s8 HEAD@{4}: xxxxxx
# 「q」で戻って・・・
git reset --hard 'HEAD@{4}'
# のように数字を指定すると元に戻る!
@satoshin2071
satoshin2071 / gist:4b9a66e0a7ec18a6fa21
Last active June 10, 2021 13:01
Gitチュートリアル 変更を戻す revert,reset 編

Gitチュートリアル 変更を戻す2

##概要

revert, reset, 両者の違いについて , ついでにclean

##git revert

``によって加えられたすべての変更を元に戻す新しいコミットを生成し、現在のブランチに適用する。

@Getaji
Getaji / How-to-Lombok.md
Last active September 1, 2020 01:13
書きかけのLombok解説

#概要

 黒魔術ライブラリことLombokについての解説です。公式ドキュメントからの和訳と多分な意訳によって構成されています。

 すでにこちらの”JavaでAndroid開発をするなら絶対に導入したいLombok - 超戦士が秘めたる13のパワー[劇場版]”で解説がありますが、当記事では各パラメータやオプションの解説も行っていきます。そういった部分も把握して使いこなしたい、と言った場合に参考にしていただければと思います。

 Experimental features(実験的な機能)はバージョンアップによって削除される可能性が高いため解説は行いません。Lombokのアップデートによってメインパッケージへと移動した場合は追記を行う予定です。

 かなり長くなるので見出しをご活用ください。

@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
function! s:separate_defenition_to_each_filetypes(ft_dictionary) "{{{
let result = {}
for [filetypes, value] in items(a:ft_dictionary)
for ft in split(filetypes, ",")
if !has_key(result, ft)
let result[ft] = []
endif
call extend(result[ft], copy(value))