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! EditReg(reg) | |
let l:EditRegWinNum = bufwinnr("__EDITREG__") | |
if l:EditRegWinNum == -1 | |
silent! belowright new __EDITREG__ | |
setlocal modifiable | |
put! =getreg(a:reg) | |
$d_ | |
setlocal noshowcmd |
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
let s:InitMenu = 'Font' | |
let s:NextMenu = '' | |
function! LatexFont(findstart, base) | |
if a:findstart | |
let line = getline('.') | |
let start = col('.') - 1 | |
while start > 0 && line[start - 1] =~ '\a' | |
let start -= 1 | |
endwhile |
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 exists('loaded_panel') | |
finish | |
endif | |
let loaded_panel = 1 | |
" TODO maybe move configuration to .vimrc | |
" TODO when a width of 0 is given -> ask panel for size; introduce min/max width | |
let s:panels_config = { 'files':{'run':'Files', 'width':60}, | |
\ 'buffers':{'run':'Buffers', 'width':20}, | |
\ 'tags':{'run':'Tags', 'width':30}, |
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
#!/bin/bash | |
prog=$0 | |
bash -l -c "$prog.sh" |
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
#!/bin/bash | |
# extend PATH variable; dirty workaround for the audio extraction feature which requires ffmpeg | |
PATH=$PATH:/usr/local/bin | |
# save tool paths in variables | |
CocoaDialog='/Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog' | |
YoutubeDL='/usr/local/bin/youtube-dl' | |
# get clipboard content |
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
#!/bin/bash | |
# save tool paths in variables | |
CocoaDialog='/Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog' | |
YoutubeDL='/usr/local/bin/youtube-dl' | |
# get clipboard content | |
Clipboard=$(pbpaste) | |
# run youtube-dl |
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
#!/usr/bin/env bash | |
if [[ -z "$(file -b "${1}" | grep -o '1024 x 1024')" ]] ; then | |
echo "ensure PNG size is 1024x1024 pixels" | |
exit 1 | |
fi | |
TmpDir="/tmp/png2icns.iconset" | |
mkdir -p "${TmpDir}" | |
sips -z 16 16 "${1}" --out "${TmpDir}/icon_16x16.png" | |
sips -z 32 32 "${1}" --out "${TmpDir}/[email protected]" | |
sips -z 32 32 "${1}" --out "${TmpDir}/icon_32x32.png" |
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
-- load the log module | |
local log = require("log") | |
-- some function for demo | |
function add(a, b) | |
return a+b | |
end | |
-- wrap the main script in a main function | |
function main() |
NewerOlder