This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
# Function to extract archives | |
function extract() { | |
case $1 in | |
*.tar.bz2) tar xjvf "$1" ;; | |
*.tar.gz) tar xvzf "$1" ;; | |
*.bz2) bunzip2 "$1" ;; | |
*.gz) gunzip "$1" ;; | |
*.tar) tar xvf "$1" ;; | |
*.tbz2) tar xjvf "$1" ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
# Function to grep the list of precesses | |
function grep_process() { | |
if [ ! -z "$1" ] ; then | |
ps aux | grep -i "$1" | grep -v grep | |
else | |
echo "Need a process name to grep processes for..." | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
# Function to grep the command history | |
function grep_history() { | |
if [ ! -z "$1" ] ; then | |
history | grep "$1" | grep -v histg | |
else | |
echo "Need a command to grep history for..." | |
fi | |
} | |
alias chg='grep_history' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Vim Path | |
export VIMRUNTIME=`vim -e -T dumb --cmd 'exe "set t_cm=\<C-M>"|echo $VIMRUNTIME|quit' | tr -d '\015' ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim color file | |
" Maintainer: Kevin S Kirkup <[email protected]> | |
" Last Change: 2005 Feb 27 | |
" This color scheme uses a black background. | |
" First remove all existing highlighting. | |
set background=dark | |
highlight clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Filename: bblean.vim | |
" Purpose: Vim syntax file for bblen resource files | |
" Language: bblean *.rc files | |
" Maintainer; Kevin S Kirkup [email protected] | |
" URL: | |
" Last Update: Sat 11/19/2005 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"----------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <comutil.h> | |
_com_util::ConvertBSTRToString("") | |
_com_util::ConvertStringToBSTR(""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STDMETHODIMP CMyClass::GetThings(VARIANT* returnThings) | |
{ | |
HRESULT hr = S_OK; | |
SAFEARRAY FAR* safeArray; | |
SAFEARRAYBOUND safeArrayBound; | |
if (m_thing != NULL) | |
{ | |
std::set<const char *>::iterator it; | |
std::set<const char *> things = m_thing->GetThings(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
A sub-routine for trimming unwanted characters from strings. | |
Taken from http://www.macosxautomation.com | |
*) | |
on trim_line(this_text, trim_chars, trim_indicator) | |
-- 0 = beginning, 1 = end, 2 = both | |
set x to the length of the trim_chars | |
-- TRIM BEGINNING | |
if the trim_indicator is in {0, 2} then | |
repeat while this_text begins with the trim_chars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Dynamically generate the html script tag to prevent | |
// blocking the parser. | |
// http://css-tricks.com/thinking-async/ | |
// | |
jQuery.ajax({ | |
url: '//third-party.com/resource.js', | |
dataType: 'script', | |
success: function() { | |
// script loaded, do stuff! |
OlderNewer