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
Setup: | |
------ | |
See ror-deploy.txt for general instructions. | |
Create user: | |
------------ | |
groupadd staff | |
useradd [user] -g staff |
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
Setup: | |
------ | |
See ror-deploy.txt for general instructions. | |
Packages: | |
--------- | |
sudo aptitude update | |
sudo aptitude safe-upgrade |
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
General steps for a RoR deployment on linux. | |
For Ubuntu, see ubuntu-deploy.txt | |
For CentOS, see centos-deploy.txt | |
Information: | |
------------ | |
- users | |
cat /etc/passwd |
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 | |
def sort_colours(str) | |
ranking = { | |
"blue" => 1, | |
"orange" => 2, | |
"green" => 3, | |
"yellow" => 4, | |
"pink" => 5, | |
"red" => 6, |
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 | |
input = [["GREY", "1"], ["GREY", "2"], ["GREY", "3"], ["LIME", "1"], ["LIME", "2"], ["LIME", "3"], ["PINK", "1"], ["PINK", "2"], ["PINK", "3"], ["RED", "1"], ["RED", "2"], ["RED", "3"]] | |
out = {} | |
input.each do |a| | |
out[a.first] ||= [] | |
out[a.first] << a.last | |
end |
NewerOlder