Login to your VPS from command line and type the following:
$ cd /var
$ mkdir repo && cd repo
$ mkdir site.git && cd site.git
$ git init --bare
--bare
means that our folder will have no source files, just the version control.
find . -name '*.*' ! -type d -exec bash -c 'expand -t 2 "$0" > /tmp/e && mv /tmp/e "$0"' {} \; |
require 'bcrypt' | |
module Encryptor | |
def digest(password) | |
::BCrypt::Password.create(password, cost: 3).to_s | |
end | |
module_function :digest | |
def compare(encrypted_password, password) | |
return false if encrypted_password.blank? |
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).
# Add it to Gemfile | |
gem 'rack-cors', :require => 'rack/cors' |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
TAGS | |
REVISION | |
*.tmproj | |
*~ | |
.DS_Store | |
.settings | |
.project | |
.tasks-cache | |
.svn | |
*DONOTVERSION* |
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
sudo rm -rf /Library/Receipts/mysql* | |
sudo rm -rf /Library/Receipts/MySQL* | |
sudo rm -rf /var/db/receipts/com.mysql.* | |
sudo rm /etc/my.cnf | |
sudo vi /etc/hostconfig and delete string MYSQLCOM=-YES- | |
Download from http://dev.mysql.com/downloads/mysql/5.1.html#downloads |
sudo su | |
groupadd www | |
useradd aratak --shell /bin/bash --group www --home /home/aratak | |
mkdir /home/aratak | |
chown aratak:www /home/aratak | |
passwd aratak | |
# add username to AllowUsers /etc/ssh/sshd_config | |
# add `aratak ALL=(ALL) NOPASSWD:ALL` to the /etc/sudoers | |
sudo service ssh restart |
pkg | |
.bundle | |
.DS_Store | |
TAGS | |
REVISION | |
*.tmproj | |
*~ | |
.settings | |
.project | |
.tasks-cache |