Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
Snippets: | |
jQuery.logThis = function( text ){ | |
if( (window['console'] !== undefined) ){ | |
console.log( text ); | |
} | |
} |
public interface IRepository<T>: IDisposable where T : class | |
{ | |
/// <summary> | |
/// Gets all objects from database | |
/// </summary> | |
IQueryable<T> All(); | |
/// <summary> | |
/// Gets objects from database by filter. | |
/// </summary> |
public T Resolve<T>() where T : class | |
{ | |
return ContainerManager.Container.IsRegistered<T>()?ContainerManager.Resolve<T>():null; | |
} | |
public object Resolve(Type type) | |
{ | |
return ContainerManager.Container.IsRegistered(type)?ContainerManager.Resolve(type):null; | |
} |
set nocompatible " be iMproved | |
filetype off " required! | |
"-------------------- | |
"" enable vundle | |
"-------------------- | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
$.urlParam = function(name){ | |
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); | |
return results[1] || 0; | |
} |
# assumptions: virtualbox, vagrant already installed | |
# and there is a box lucid32 | |
1. rails new appdmeo , gem capistrano , then bundle | |
2. vagrant init lucid32 | |
3. capify . | |
# !important | |
# vagrant ssh-config >> ~/.ssh/config | |
# vagrant ssh-config | grep IdentityFile | awk '{print $2}' that's where private key located |
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CSS: source.css |
$.expr[':'].external = function(elem,index,match) { | |
var url = elem.href || elem.src, | |
loc = window.location; | |
return !!url.match(new RegExp('^' + loc.protocol + '//' + '(?!' + loc.hostname + ')' )); | |
}; | |
// You can now use it within your selectors: | |
// Find all external anchors: |
# The latest version of this script is now available at | |
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
VERSION=1.9.3-p286 | |
brew update | |
brew install rbenv ruby-build rbenv-vars readline ctags | |
if [ -n "${ZSH_VERSION:-}" ]; then | |
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
else | |
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |