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 g:gitgutter_signs=0 | |
function! GitStatus() | |
return join(filter(map(['A','M','D'], {i,v -> v.': '.GitGutterGetHunkSummary()[i]}), 'v:val[-1:]'), ' ') | |
endfunction | |
set statusline+=%{GitStatus()} |
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
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= FoundationLinkRenderer | |
super.try :html_safe | |
end | |
class FoundationLinkRenderer < LinkRenderer | |
protected |
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
require 'net/ftp' | |
CONTENT_SERVER_DOMAIN_NAME = "one-of-the-ftp-server.thought-sauce.com.hk" | |
CONTENT_SERVER_FTP_LOGIN = "saucy-ftp-server-login" | |
CONTENT_SERVER_FTP_PASSWORD = "saucy-ftp-server-password" | |
# LOGIN and LIST available files at default home directory | |
Net::FTP.open(CONTENT_SERVER_DOMAIN_NAME, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp| | |
files = ftp.list |
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
blank_object = { | |
:parent => nil, | |
:slots => {}, | |
:size => 0 | |
} | |
def send(receiver, message, *params, &block) | |
method_owner = receiver | |
while(method_owner[:slots][:lookup].nil?) | |
puts "ERR: lookup failed for ':lookup' on object:\n#{receiver.inspect}" and break if(method_owner[:parent].nil?) |