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 OpenNotification < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :listing | |
validates_presence_of :user_id | |
validates_presence_of :listing_id | |
validates_uniqueness_of :listing_id, :scope => :user_id | |
validate :a_user_cannot_get_a_notification_for_their_own_listing | |
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
XML response for the main grid (translationsFeed): | |
<?xml version='1.0' encoding='utf-8'?><rows><page>1</page><total>1</total><records>10</records><row id='2'><cell><![CDATA[2]]></cell><cell><![CDATA[6]]></cell><cell><![CDATA[EN]]></cell><cell><![CDATA[Cheese]]></cell><cell><![CDATA[It's cheesy goodness!]]></cell><cell>2011-06-20 14:53:52</cell><cell>2011-06-23 12:28:39</cell><cell><![CDATA[No]]></cell></row><row id='1'><cell><![CDATA[1]]></cell><cell><![CDATA[]]></cell><cell><![CDATA[EN]]></cell><cell><![CDATA[Hello!]]></cell><cell><![CDATA[]]></cell><cell></cell><cell></cell><cell><![CDATA[No]]></cell></row><row id='5'><cell><![CDATA[5]]></cell><cell><![CDATA[]]></cell><cell><![CDATA[EN]]></cell><cell><![CDATA[How are you feeling today?]]></cell><cell><![CDATA[]]></cell><cell></cell><cell></cell><cell><![CDATA[No]]></cell></row><row id='4'><cell><![CDATA[4]]></cell><cell><![CDATA[]]></cell><cell><![CDATA[EN]]></cell><cell><![CDATA[How much does this cost?]]></cell><cell><![CDATA[]]></cell><cell></cell><cell |
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 Order < ActiveRecord::Base | |
# This array includes the list of possible states that an Order can be in. These reflect the steps | |
# that an order goes through from placement to fulfilment. | |
# | |
# nil The initial state of any Order record | |
# checking_terminals Checking if the terminals involved in this order are online | |
# terminals_offline One of more of the printers/terminals for this order are offline | |
# charging Attempting to charge the customer's credit card via BrainTree | |
# failed_to_charge BrainTree returned an error |
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 Order < ActiveRecord::Base | |
... | |
after_initialize :init | |
before_validation :can_be_placed? | |
before_save :process_transaction, :on => :create | |
validates :customer_id, | |
:company_id, |
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
# What ports, IPs and protocols we listen for | |
Port 22 | |
Protocol 2 | |
# HostKeys for protocol version 2 | |
HostKey /etc/ssh/ssh_host_rsa_key | |
HostKey /etc/ssh/ssh_host_dsa_key | |
HostKey /etc/ssh/ssh_host_ecdsa_key | |
UsePrivilegeSeparation yes |
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
pi@pi ~ $ tail -n 10000 /var/log/syslog | |
Aug 6 15:40:00 pi pppd[1479]: Connection terminated. | |
Aug 6 15:40:00 pi avahi-daemon[2868]: Withdrawing workstation service for ppp0. | |
Aug 6 15:40:00 pi pppd[1479]: using channel 1815 | |
Aug 6 15:40:00 pi pppd[1479]: Using interface ppp0 | |
Aug 6 15:40:00 pi pppd[1479]: Connect: ppp0 <--> /dev/pts/0 | |
Aug 6 15:40:00 pi pptp[14671]: anon fatal[get_ip_address:pptp.c:437]: getaddrinfo(): Name or service not known | |
Aug 6 15:40:00 pi pppd[1479]: Script pptp [VPN SERVER IP] --nolaunchpppd --debug finished (pid 14670), status = 0x1 | |
Aug 6 15:40:00 pi pppd[1479]: Modem hangup | |
Aug 6 15:40:00 pi pppd[1479]: Connection terminated. |
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
[lines containing credentials and VPN server IP address excluded] | |
remotename PPTP | |
require-mppe-128 | |
require-mschap-v2 | |
refuse-eap | |
refuse-pap | |
refuse-chap | |
refuse-mschap | |
noauth |
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
# Contains a list of rolls that a bowling player throws, and from that can tell | |
# you the score of the game in progress or finished, the visual score (with 'X' | |
# and '/', etc.), and the score of any frame within the game. | |
# | |
# Examples: | |
# | |
# > g = Game.new | |
# => [] | |
# | |
# > g.roll(3) |
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 Order < ActiveRecord::Base | |
... | |
validates :customer_id, | |
:company_id, | |
:credit_card_id, | |
:tip, | |
:delivery_location, | |
presence: true |
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
source "https://rubygems.org" | |
gem 'curb' |
OlderNewer