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
sudo apt-get install unzip; | |
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/; |
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
MARS ROVERS PROBLEM | |
A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth. | |
A rover's position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North. | |
In order to control a rover, NASA sends a simple string of letters. The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover spin 90 degrees left or right respectively, without moving from its current spot. 'M' means move forward one grid point, and maintain the same heading. | |
Assume that the square directly North from (x, y) is (x, y+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
rails 3.1 java runtime error | |
gem 'execjs' | |
gem 'therubyracer' |
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
sudo apt-get install libxslt1-dev | |
libxml, libxml-dev, libxslt, libzslt-dev |
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
SHOW DATABASES; - список баз данных | |
SHOW TABLES [FROM db_name]; - список таблиц в базе | |
SHOW COLUMNS FROM таблица [FROM db_name]; - список столбцов в таблице | |
SHOW CREATE TABLE table_name; - показать структуру таблицы в формате "CREATE TABLE" | |
SHOW INDEX FROM tbl_name; - список индексов | |
SHOW GRANTS FOR user [FROM db_name]; - привилегии для пользователя. | |
SHOW VARIABLES; - значения системных переменных | |
SHOW [FULL] PROCESSLIST; - статистика по mysqld процессам |
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
rvm implode | |
rm ~/.rvmrc | |
curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer --version 1.8.0 | |
; | |
rvm implode | |
gem uninstall rvm |
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
class Widget < ActiveRecord::Base | |
has_many :widget_groupings | |
has_many :people, :through => :widget_groupings, :source => :grouper, :source_type => 'Person' | |
has_many :aliens, :through => :widget_groupings, :source => :grouper, :source_type => 'Alien' | |
end | |
class Person < ActiveRecord::Base | |
has_many :widget_groupings, :as => grouper | |
has_many :widgets, :through => :widget_groupings |
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
sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
sudo apt-get install sublime-text-2 |
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
ctrl+a or Home - Moves the cursor to the start of a line. | |
ctrl+e or End - Moves the cursor to the end of a line. | |
ctrl+b - Moves to the beginning of the previous or current word. | |
ctrl+k - Deletes from the current cursor position to the end of the line. | |
ctrl+u - Deletes the whole of the current line. | |
ctrl+w - Deletes the word before the cursor. |
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
mkdir -p /Library/Application\ Support/TextMate/Bundles | |
cd !$ | |
git clone git://github.com/timcharper/git-tmbundle.git Git.tmbundle | |
osascript -e 'tell app "TextMate" to reload bundles' | |
Ctr+Shift+G => blame | |
enjoy! |
OlderNewer