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
" pvinis | |
""" Intro | |
set nocompatible " viMproved | |
" Needed for vundle, will be turned on after vundle inits | |
filetype off | |
" Setup vundle |
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
nnoremap n n:call Recenter(15)<CR> | |
nnoremap N N:call Recenter(15)<CR> | |
function! Recenter(tolerance) | |
if (abs(winline()-winheight(0)/2)>a:tolerance) | |
exe 'norm! zz' | |
endif | |
endfunction |
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
# for spyshell | |
function zshexit() { | |
cat /Users/`whoami`/.termlogs/`date +%Y-%m-%d`.txt | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b > temp | |
mv temp /Users/`whoami`/.termlogs/`date +%Y-%m-%d`.txt | |
exit | |
} |
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
s = 1 | |
gifts.split("\n")[-day..-2].each{|l| s += l.to_i} | |
s |
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
framework 'Cocoa' | |
framework 'avfoundation' | |
class FaceDetectionDelegate | |
attr_accessor :window | |
def applicationDidFinishLaunching(aNotification) | |
width = 1280 | |
height = 720 |
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/local/bin/macruby | |
framework 'Cocoa' | |
framework 'AVFoundation' | |
# because we love blocks, we make NSTimer blocks :-) | |
class NSTimer | |
def self.scheduledTimerWithTimeInterval interval, repeats: repeat_flag, block: block | |
self.scheduledTimerWithTimeInterval interval, | |
target: self, | |
selector: 'executeBlockFromTimer:', |
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
framework 'Cocoa' | |
class NSColor | |
def toCGColor | |
color_RGB = colorUsingColorSpaceName(NSCalibratedRGBColorSpace) | |
## approach #1 | |
# components = Array.new(4){Pointer.new(:double)} | |
# color_RGB.getRed(components[0], | |
# green: components[1], | |
# blue: components[2], |
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
Show hidden characters
t+m |
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
def ok | |
a = [] | |
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
"package_name_map": { | |
"soda-theme": "Theme - Soda" | |
} | |
} |