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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
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
- (BOOL)stringContainsEmoji:(NSString *)string | |
{ | |
__block BOOL returnValue = NO; | |
[string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock: | |
^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { | |
const unichar hs = [substring characterAtIndex:0]; | |
// surrogate pair | |
if (0xd800 <= hs && hs <= 0xdbff) { | |
if (substring.length > 1) { |
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
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
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
/* | |
UIImage+AverageColor.m | |
Copyright (c) 2010, Mircea "Bobby" Georgescu | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. |
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
// | |
// KBNetworkActivityIndicator.h | |
// Kobov3 | |
// | |
// Created by Jim Dovey on 10-03-21. | |
// Copyright 2010 Kobo Inc. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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/perl | |
# | |
# This script parses a crashdump file and attempts to resolve addresses into function names. | |
# | |
# It finds symbol-rich binaries by: | |
# a) searching in Spotlight to find .dSYM files by UUID, then finding the executable from there. | |
# That finds the symbols for binaries that a developer has built with "DWARF with dSYM File". | |
# b) searching in various SDK directories. | |
# |
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
// Getter and setter | |
var TEST = (function(exposed) { | |
// Underbar method | |
var User = exposed.User = function() { | |
this._name = 'teste'; // readonly | |
} | |
User.prototype = (function() { | |
function private() { | |
this._name = 'im private'; |
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 | |
# Load RVM, if you are using it | |
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm | |
# Add rvm gems and nginx to the path | |
export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin:~/bin:/opt/local/bin:/opt/local/sbin | |
# Path to the bash it configuration | |
export BASH=$HOME/.bash_it |
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
# install node wherever... | |
cat <<NPMRC >>$HOME/.npmrc | |
root = ~/.node_libraries | |
manroot = ~/local/share/man | |
binroot = ~/bin | |
NPMRC | |
curl http://npmjs.org/install.sh | 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
startup_message off | |
shell -${SHELL} | |
caption always "%n(%t) : %C" | |
defscrollback 1024 | |
startup_message off | |
hardstatus on | |
hardstatus alwayslastline | |
setenv LC_CTYPE en_US.UTF-8 | |
defutf8 on |
NewerOlder