- RVM is used
- In the version of ruby that is used, bundler gem is installed [ implied that it is global]
This file contains hidden or 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
# tested on an EL5 based platform | |
yum -y install perl-Archive-Zip ant bison flex pam-devel cups-devel gperf libxslt-devel openldap-devel gstreamer-devel gstreamer-plugins-base-devel db4-devel unixODBC-devel xalan-j2 boost-devel unixODBC-devel qt-devel subversion autoconf automake gtk2-devel gcc-c++ gnome-vfs2-devel rpm-build expat-devel python-devel curl-devel gcc gcc-c++ java-1.6.0-openjdk-devel libIDL-devel libXaw-devel bison | |
wget https://raw.github.com/gist/1247669/88133c7c8da53d257c38ff73b161d116aed18c13/dot-screenrc -O ~/.screenrc | |
wget http://download.services.openoffice.org/files/stable/3.3.0/OOo_3.3.0_src_core.tar.bz2 | |
wget http://download.services.openoffice.org/files/stable/3.3.0/OOo_3.3.0_src_system.tar.bz2 | |
tar xjf OOo_3.3.0_src_core.tar.bz2 | |
tar xjf OOo_3.3.0_src_system.tar.bz2 | |
cd ~/OOO330_m20/ | |
wget http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll -O ./external/unowinreg/unowinreg.dll |
This file contains hidden or 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
# source: http://patshaughnessy.net/2012/1/4/never-create-ruby-strings-longer-than-23-characters | |
# Observation:Not all strings are created equal in Ruby 1.9.3. | |
# Ruby actually uses three different types of string values: | |
# - Heap Strings, | |
# - Shared Strings, and | |
# - Embedded Strings |
This file contains hidden or 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 Object | |
def method_missing m, *args | |
Object.respond_to?(m, true) ? Object.send(m, self, *args) : super | |
end | |
end |
This file contains hidden or 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
Capybara.register_driver :selenium do |app| | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile.assume_untrusted_certificate_issuer = true #false # <-- This is 'The Configuration Line' | |
end | |
# Links to untrusted connection issue in different browsers: | |
# http://code.google.com/p/threadfix/wiki/GettingStartedThreadfixPrivateBeta1 | |
# http://twitpic.com/94zk8t in Chrome Untrusted Connection | |
# http://twitpic.com/94zl3i in Firefox Untrusted Connection | |
# http://twitpic.com/94zlje in IE Untrusted Connection |
This file contains hidden or 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 User < ActiveRecord::Base | |
has_one user_profile, :dependent => :destroy | |
def admin? | |
user.user_profile.type.titleize == "Admin" | |
end | |
def exhibition_curator? | |
user.user_profile.type.titleize == "Exhibition Curator" | |
end |
This file contains hidden or 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 User < ActiveRecord::Base | |
has_one user_profile, :dependent => :destroy | |
delegate :admin?, :artist?, :collector?, :estate?, :exhibition_curator?, :to => :user_profile_type | |
def user_profile_type | |
user.user_profile.type.downcase.inquiry | |
end | |
end |
In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:
Documentation
-
Accurate / up-to-date systems architecture diagram
-
Accurate / up-to-date network diagram
-
Out-of-hours support plan
-
Incident management plan
This file contains hidden or 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
Once you have your own instance of copycopter-server running, you need to do the following: | |
1. Create a new project and take note of its hostname and api key | |
2. Make sure you are on the latest version of the copycopter_client gem, at the time of this writing it is 2.0.0 | |
3. Export the latest version of your published drafts: | |
$ RAILS_ENV=production bundle exec rake copycopter:export |
This file contains hidden or 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
I'm puzzled by the behavior of take_while and drop_while when called without | |
a block. They return enumerators -- that part I understand -- but I'm not | |
understanding how those enumerators behave. | |
Here's what I mean: | |
>> enum = [1,2,3,4,5].take_while | |
=> #<Enumerator: [1, 2, 3, 4, 5]:take_while> | |
>> enum.next | |
=> 1 |