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! ToggleMinimap() | |
if exists("s:isMini") && s:isMini == 0 | |
let s:isMini = 1 | |
else | |
let s:isMini = 0 | |
end | |
if (s:isMini == 0) | |
" save current visible lines | |
let s:firstLine = line("w0") |
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
" find, then highlight file | |
function! NERDTreeFindHighlight() | |
let s:filename = expand("%:t") | |
NERDTreeFind | |
silent! exe "normal /" . s:filename . "/\<CR>" | |
endfunction | |
command! NERDTreeFindHighlight call NERDTreeFindHighlight() |
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! ChangeDirectoryToNERDTreeDir() | |
" fallback to parent directory | |
let s:path = expand("%:p:h") | |
" if NERDTree is present in this tab, cd to it: | |
if exists("g:NERDTreeDirNode.GetRootForTab().path._strForCd()") | |
let s:path = g:NERDTreeDirNode.GetRootForTab().path._strForCd() | |
endif | |
" don't do anything if we're restoring a session |
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
<div id="fanvibe-widget"> | |
<a href="http://fanvibe.com" id="fanvibe-link">See more on Fanvibe.com</a> | |
</div> | |
<script type="text/javascript"> | |
var fanvibeUID = 2; | |
(function() { var s, s1; s = document.createElement('SCRIPT'); s.type = 'text/javascript'; s.async = true; s.src = 'http://fanvibe.com/widgets.js?uid=' + fanvibeUID; s1 = document.getElementsByTagName('SCRIPT')[0]; s1.parentNode.insertBefore(s, s1); document.getElementById("fanvibe-link").style.visibility = 'hidden'; })(); | |
</script> |
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
// Example using the ASIHTTPRequest library | |
// http://allseeing-i.com/ASIHTTPRequest/ | |
- (IBAction)checkIn:(id)sender { | |
NSURL* url = [NSURL URLWithString:@"https://api.fanvibe.com/v1/checkin"]; | |
ASIFormDataRequest* request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease]; | |
[request setDelegate:self]; | |
[request setRequestMethod:@"POST"]; | |
[request setPostValue:@"107763" forKey:@"game_id"]; |
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 address book reference | |
ABAddressBookRef addressBook = ABAddressBookCreate(); | |
CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook); | |
CFIndex nPeople = ABAddressBookGetPersonCount(addressBook); | |
// Pull all records out of address book | |
NSMutableArray* users = [[NSMutableArray alloc] init]; | |
for (int i = 0; i < nPeople; i++) { | |
ABRecordRef ref = CFArrayGetValueAtIndex(allPeople, i); | |
CFStringRef firstName = ABRecordCopyValue(ref, kABPersonFirstNameProperty); |
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
socket: /var/mysql/mysql.sock |
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
AuthType Basic | |
AuthName "Password Required" | |
AuthUserFile /home/joe/public_html/kiwis/.htpasswd | |
AuthGroupFile /dev/null | |
Require user admin |
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
ActionController::Base.logger = Logger.new(STDOUT) | |
app.get '/athletes/browse' |
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
ActionController::Routing::Routes.routes.each do |r| | |
puts r | |
end |
NewerOlder