Skip to content

Instantly share code, notes, and snippets.

View ihoey's full-sized avatar
🎯
Focusing

Ihoey ihoey

🎯
Focusing
View GitHub Profile
@sulco
sulco / clown-formatter.js
Created December 10, 2018 19:11
A clown formatter
window.devtoolsFormatters = [{
header: function(obj){
if (!obj.__clown) {
return null;
}
delete obj.__clown;
const style = `
color: red;
border: dotted 2px gray;
border-radius: 4px;
@StuPig
StuPig / pre-push
Created December 9, 2014 12:18
禁止直接向master和develop分之提交代码的钩子,放在.git/hooks/pre-push
#!/bin/bash
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ "$current_branch" = "master" ] || [ "$current_branch" = "develop" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
echo "禁止直接向master或develop分支提交代码!"
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
@STAR-ZERO
STAR-ZERO / .zshrc
Created June 9, 2012 15:31
PROMPTに顔文字(oh-my-zshのrobbyrussellテーマに追加)
#顔文字固定で色ランダム
PROMPT=$'%{\e[$[32+$RANDOM % 5]m%}(。◕‿◕。)%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
#顔文字も色もランダム
FACE_CHAR=("(。◕‿◕。) " "(・∀・)ノ " "( ゚Д゚) " "(。╹ω╹。)" "♡♡♡♡" "☆☆☆☆")
PROMPT=$'%{\e[$[32+$RANDOM % 5]m%}$FACE_CHAR[$[$RANDOM % ${#FACE_CHAR[@]} + 1]]%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'