Skip to content

Instantly share code, notes, and snippets.

@code4rain
code4rain / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@code4rain
code4rain / tmux.conf
Last active March 14, 2016 16:37
My tmux configuration
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm"
set-window-option -g xterm-keys on
# set scrollback history to 10000 (10k)
@code4rain
code4rain / conversation.py
Last active August 29, 2015 14:15
Change outlook conversation topic with Categories
import os, sys, re
import win32com.client
from win32com.client import Dispatch, constants
# Remove dulicate word in the list
def unique_list(l):
ulist = []
[ulist.append(x.strip()) for x in l if x not in ulist]
return ulist
@code4rain
code4rain / Change Outlook Conversation Topic by VBA.vba
Created February 18, 2015 10:23
Change Outlook Conversation Topic by VBA
Dim outlookNameSpace As Outlook.NameSpace
Dim inbox As Outlook.MAPIFolder
Private WithEvents items As Outlook.items
Dim WithEvents myInboxMailItem As Outlook.items
Dim WithEvents mySentboxMailItem As Outlook.items
Private Sub myInboxMailItem_ItemAdd(ByVal Item As Object)
Dim oNS As Object
Dim oRDOSess As Object
@code4rain
code4rain / vimrc
Created February 20, 2015 19:44
My vim configuration
set nocompatible " be iMproved
set rtp+=~/.fzf
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" For Vundle
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@code4rain
code4rain / conversation_part_1.py
Created February 24, 2015 12:20
Chage converastion part #1
# Uncomment below 3 lines if you want to change conversation topic in specific folder
# top = mapi.Folders.Item("MyOutlook")
# for i in range(1, top.Folders.Count + 1):
# parse_folder('', top.Folders[i])
# Comment out below 2 lines if you want to change conversation topic in specific folder
for i in range(1, mapi.Folders.Count + 1):
parse_folder('', mapi.Folders[i])
@code4rain
code4rain / change_conversation_part_2.py
Created February 24, 2015 12:22
Change coversation part 2
# Uncomment below 3 lines if you want to change conversation topic in specific folder
top = mapi.Folders.Item("MyOutlook") # Replace MyOutlook to your PST name
for i in range(1, top.Folders.Count + 1):
parse_folder('', top.Folders[i])
# Comment out below 2 lines if you want to change conversation topic in specific folder
#for i in range(1, mapi.Folders.Count + 1):
# parse_folder('', mapi.Folders[i])
@code4rain
code4rain / .p4config
Created April 24, 2016 09:10
Sample .p4config file
P4CLIENT=<Perforce Client Name ex:ALEX_SYSTEM_SW_DEV_GIT>
P4USER=<Perforce ID ex:alex.jang>
P4PORT=<Perfoce IP/Port ex:165.213.202.46:1716>
P4PASSWD=<자신의 Perforce Password>
@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()
@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 환경 설정