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
struct STACK_IMPL { | |
int length; | |
STACK_VALUE array[5]; | |
}; | |
void stack_push(STACK *stack, STACK_VALUE value) { | |
stack->length++; | |
stack->array[stack->length] = value; | |
} |
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
struct STACK_IMPL { | |
int length; //current number of entries | |
int max_size; //size of the currently allocated array | |
STACK_VALUE *array; | |
}; | |
void stack_push(STACK *stack, STACK_VALUE value) { | |
stack->array[stack->length] = value; | |
stack->length++; | |
} |
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
# requires root permissions in /usr/bin/ | |
star = String.new | |
8.times { star += "*" } | |
Star = "\n#{star * 3}\n" | |
def newblock string | |
puts "\n#{Star}#{string}#{Star}\n" | |
end |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKMHCA9VJG51bGzTCQoLDA0OViRjbGFzc1xOU0NvbG9yU3BhY2VVTlNSR0KAAhAB | |
TxAnMC4xNjQyMzM1ODAyIDAuMTY0MjMzNTgwMiAwLjE2NDIzMzU4MDIA0hAREhNaJGNs | |
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp |
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
https = require 'https' | |
url = require 'url' | |
querystring = require 'querystring' | |
credentials = 'sekret' | |
option '-m', '--message [MESSAGE]', 'message to send' | |
option '-t', '--title [TITLE]', 'title in the notification' | |
option '-l', '--longmessage [LONGMESSAGE]', 'longmessage to send' | |
option '-s', '--subtitle [SUBTITLE]', 'subtitle of the notification' |
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
" create a new fold with {{{ }}} markers | |
function! s:Fold(fold) | |
let beg = substitute(&commentstring, '%s', a:fold, '') | |
let end = substitute(&commentstring, '%s', 'END '.a:fold, '') | |
call setline('.', beg.' {{{') | |
call append('.', end.' }}}') | |
endfunction | |
command! -nargs=1 Fold :call s:Fold(<f-args>) |
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! Syn() | |
for id in synstack(line("."), col(".")) | |
echo synIDattr(id, "name") | |
endfor | |
endfunction | |
command! -nargs=0 Syn call Syn() |
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
" if the current buffer has a different working directory than the one when | |
" Vim starts, source the .localvimrc | |
augroup Localvimrc | |
autocmd! | |
autocmd VimEnter * if filereadable('.localvimrc') | |
\| so .localvimrc | |
\| endif | |
\| let g:localvimrc_directory = getcwd() | |
autocmd BufEnter,BufNewFile * if getcwd() != g:localvimrc_directory && filereadable('.localvimrc') |
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
command! -complete=file -nargs=1 TODO :exec "grep -r TODO:" <q-args> | :copen |
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
" Fugitive | |
command! -nargs=0 Gwipe bufdo if expand("%") =~ '^fugitive' | |
\| execute 'bw' | |
\| endif |
OlderNewer