⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 :sync_directories, ["public/assets", "public/galleries"] | |
set :sync_backups, 3 |
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
#Config is there http://github.com/spyou/vim-config | |
#Give a go to vimtutor in order to have a little overview of Vim. | |
"open/save" | |
#:w (save) | |
#:q (quit) | |
#:qa (quit all buffers) | |
#:q! (quit without saving) | |
#:wq (save and quit) |
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 CML2 | |
# Includes to ProductCategory model | |
module ProductCategory | |
def import node_set | |
::ProductCategory.delete_all | |
::ProductCategory.import_categories \ | |
node_set.xpath('/КоммерческаяИнформация/Классификатор/Группы') | |
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
#!/usr/bin/env ruby | |
# 1. export your RIL bookmarks | |
# 2. save this file to the same directory where your ril_export.html is | |
# 3. change username and password in the script bellow | |
# 4. run 'ruby ril_to_instapaper.rb' in terminal | |
require "cgi" | |
require "net/http" | |
require "net/https" |
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
# Bulk API design | |
# | |
# resources :posts | |
class PostsController < ActiveController::Base | |
# GET /posts/1,4,50,90 | |
# post_url([ @post, @post ]) | |
def show_many | |
@posts = Post.find(params[:ids]) | |
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
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
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
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
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
namespace :jshint do | |
task :require do | |
sh "which jshint" do |ok, res| | |
fail 'Cannot find jshint on $PATH' unless ok | |
end | |
end | |
task :check => 'jshint:require' do | |
project_root = File.expand_path('../../', File.dirname(__FILE__)) | |
config_file = File.join(project_root, 'config', 'jshint.json') |
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 Moonshado | |
class Sms | |
@@delivered_sms = {} | |
alias_method :stub_deliver_sms, :deliver_sms | |
def self.delivered_sms | |
@@delivered_sms | |
end |
OlderNewer