- ⌘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
# -*- coding: utf-8 -*- | |
# получить twitter можно командой `pip install twitter` | |
import sys;reload(sys);sys.setdefaultencoding('utf-8') | |
import twitter | |
import time | |
import commands, itertools | |
consumer_key = ... | |
consumer_secret = ... | |
access_key = ... |
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
;; emacs configuration | |
(push "/usr/local/bin" exec-path) | |
(add-to-list 'load-path "~/.emacs.d") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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
# Nginx+Unicorn best-practices congifuration guide. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
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
brew install rbenv | |
brew install ruby-build | |
brew install rbenv-vars | |
brew install readline | |
brew install ctags | |
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile | |
exec $SHELL -i # reload the shell | |
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p194 | |
rbenv global 1.9.3-p194 | |
gem install bundler rbenv-rehash git-up hitch gem-browse gem-ctags cheat awesome_print pry |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This installs a patched ruby 1.9.3-p362 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
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 | |
# | |
# Install Postgres 9.2 on a clean Ubuntu 12.04 | |
""" | |
LC_ALL issue | |
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
sudo apt-get install language-pack-en-base | |
sudo dpkg-reconfigure locales | |
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |
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 | |
# Remove all gems EXCEPT defaults :) | |
`gem list -d`.split(/\n\n^(?=\w)/).each do |data| | |
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/) | |
name = match[:name] | |
versions = match[:versions].split(', ') | |
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/) | |
next if match[1].empty? # it's the only version if this match is empty |
OlderNewer