Skip to content

Instantly share code, notes, and snippets.

@code4rain
code4rain / change_subject.vba
Last active July 17, 2019 04:44
outlook vb script to change topic
Option Explicit
Private WithEvents oExpl As Explorer
Private WithEvents oItem As MailItem
Private bDiscardEvents As Boolean
Dim outlookNameSpace As Outlook.NameSpace
Dim inbox As Outlook.MAPIFolder
Private WithEvents items As Outlook.items
Dim WithEvents myInboxMailItem As Outlook.items
#!/usr/bin/env bash
cd $(git rev-parse --show-toplevel) && jekyll build && octopress deploy && git add . && git ci -m "update it" && git push
#!/usr/bin/env bash
echo -n "Input commit message: "
echo -n -e '\e[0;33m'
read input
echo -n -e '\e[0m'
file=$(octopress new post "${input}")
echo "File: $file"
emacsclient -c ${file}
git config −-global init.templatedir=~/.git_template
@code4rain
code4rain / post-rewrite
Last active July 17, 2019 02:56
git-gtags
#!/bin/sh
case "$1" in
rebase) exec .git/hooks/post-merge ;;
esac
#!/bin/sh
.git/hooks/gtags >/dev/null 2>&1 &
@code4rain
code4rain / gtags
Last active July 17, 2019 02:59
git_gtags
#!/bin/bash
set -e
PATH="/usr/local/bin:$PATH"
cd "$(git rev-parse --show-toplevel 2>/dev/null)"
rm -f GTAGS GRTAGS GPATH
git ls-files | grep -E '.*\.(c|cpp|h|hpp)$' 2>/dev/null
if [[ $? == 0 ]]
then
git ls-files | gtags -v -i -f -
fi
@code4rain
code4rain / .spacemacs
Created April 24, 2016 09:49
My additional .spacemacs for emacs init
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place you code here."
(set-language-environment "Korean")
(prefer-coding-system 'utf-8) ; utf-8 환경 설정
@code4rain
code4rain / .vimrc
Created April 24, 2016 09:13
vimrc for perforce
function! s:P4_edit_current( )
execute "!p4 edit " . expand("%")
endfunc
function! s:P4_revert_current( )
execute "!p4 revert " . expand("%")
endfunc
command! PerforceEdit call <SID>P4_edit_current()
command! PerforceRevert call <SID>P4_revert_current()