Skip to content

Instantly share code, notes, and snippets.

@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
#!/bin/sh
.git/hooks/gtags >/dev/null 2>&1 &
@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
git config −-global init.templatedir=~/.git_template
#!/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}
#!/usr/bin/env bash
cd $(git rev-parse --show-toplevel) && jekyll build && octopress deploy && git add . && git ci -m "update it" && git push
@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