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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName espace-allemand.ch | |
ServerAlias *.espace-allemand.ch | |
ServerAdmin [email protected] | |
DocumentRoot /var/www/espace-allemand/production | |
DirectoryIndex index.html | |
<Directory /var/www/espace-allemand/production > | |
AllowOverride All | |
Order Deny,Allow |
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
test |
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
curl -X POST --data-urlencode content@"md/installation.md" -d name="Md/installation.md" -d theme=v1 http://documentup.com/compiled 1> "public/installation.html" |
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
rvmuse () { | |
if [ -d ~/.rvm/gems ]; then | |
rvmdir=~/.rvm/gems | |
else | |
if [ -d /usr/local/rvm/gems ]; then | |
rvmdir=/usr/local/rvm/gems | |
else | |
echo "RVM installed?" | |
return | |
fi |
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
postgres@localhost:~()-> psql -l | |
List of databases | |
Name | Owner | Encoding | Collation | Ctype | Access privileges | |
----------------------------+-----------+-----------+-----------+-------+----------------------- | |
adb_development | postgres | SQL_ASCII | C | C | | |
alexion_development | postgres | UTF8 | C | C | | |
alexion_test | bweinraub | UTF8 | C | C | | |
aura_dashboard_development | postgres | SQL_ASCII | C | C | | |
aura_dashboard_test | bweinraub | UTF8 | C | C | | |
aura_site_development | postgres | SQL_ASCII | C | C | |
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
Hospital.create(:name => "E.O.Ü. T.F.") | |
ActiveRecord::StatementInvalid: PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xdc2e | |
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". |
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
cat test/fixtures/hospitals.yml | |
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | |
one: | |
id: 1 | |
name: E.O.Ü. T.F. | |
two: | |
id: 2 | |
bweinraub@localhost:~/dev/aura.git/alexion(alexion)-> rake db:fixtures:load FIXTURES=hospitals | |
(in /home/bweinraub/dev/aura.git/alexion) |
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
ree-1.8.7-2010.02 > ce = CalendarEvent.all[1] | |
=> #<CalendarEvent id: 12, created_at: "2010-11-17 06:26:29", updated_at: "2010-11-17 06:26:29", patient_id: 3, start_date: "2010-08-02", end_date: nil, event_type: "actual_infusion", associated_calendar_event_id: 11, months_approved: nil> | |
ree-1.8.7-2010.02 > ce.errors.full_messages | |
=> [] | |
ree-1.8.7-2010.02 > ce.valid? | |
=> false | |
ree-1.8.7-2010.02 > ce.errors.full_messages | |
=> ["Associated calendar event the associated event is already associated"] | |
ree-1.8.7-2010.02 > |
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
ree-1.8.7-2010.02 > reload! | |
Reloading... | |
=> true | |
ree-1.8.7-2010.02 > CalendarEvent.all.collect {|x| x.valid? } | |
=> [true, false, true, false] | |
ree-1.8.7-2010.02 > CalendarEvent.all.collect {|x| x.errors.full_messages } | |
=> [[], [], [], []] |
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 Foo < ActiveRecord::Base | |
end | |
class Class | |
def inherits_from?(klass) | |
raise ArgumentError.new("argument must be of type Class") unless klass.is_a? Class | |
if klass == self | |
true | |
elsif self.superclass.is_a? Class | |
self.superclass.inherits_from? klass |
NewerOlder