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 MessagingController < JSQMessagesViewController | |
| alias :'super_collectionView:cellForItemAtIndexPath' :'collectionView:cellForItemAtIndexPath' | |
| attr_accessor :messages, :incomingBubbleImageData, :outgoingBubbleImageData, :garyAvatar | |
| JSQ_MESSAGES_COLLECTION_VIEW_CELL_LABEL_HEIGHT = 20.0 | |
| def viewDidLoad | |
| super |
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
| HTTParty.post('http://developer.echonest.com/api/v4/tasteprofile/create', | |
| :body => {:api_key => '#############', | |
| :type => 'general', | |
| :name => 'tester testy' | |
| } | |
| ) | |
| => {"response"=>{"status"=>{"version"=>"4.2", "code"=>0, "message"=>"Success"}, "type"=>"general", "name"=>"tester testy", "id"=>"CAIGHXV147163258A7"}} | |
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
| [{:action=>"update", :item=>{:track_id=>"4RL77hMWUq35NYnPLXBpih"}}, | |
| {:action=>"update", :item=>{:track_id=>"2kOTgiY7BlXF7wKo65mL7a"}}, | |
| {:action=>"update", :item=>{:track_id=>"5crHvEPQ13FbQGQSscm5Ns"}}, | |
| {:action=>"update", :item=>{:track_id=>"3rhnT5RoN7bvPUpMHt1aM9"}}, | |
| {:action=>"skip", :item=>{:track_id=>"7F06kkQg868sTJRoUWq1d6"}}] |
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
| console.log('Starting Launch Sequence...'); | |
| (function launchSequence (i) { | |
| setTimeout(function () { | |
| console.log(i); | |
| if (--i){ | |
| launchSequence(i); | |
| } | |
| else { | |
| setTimeout(console.log('BLAST OFF!'), 1000); | |
| } |
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
| puts "Starting Launch Sequence..." | |
| sleep 1 | |
| (1..10).to_a.reverse.each do |num| | |
| puts num.to_s | |
| sleep 1 | |
| end | |
| puts "BLAST OFF!" |
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
| get '/' do | |
| # Create Account | |
| company_name = "Company_" + rand(1000000).to_s | |
| new_account = Account.create(name: company_name) | |
| # not sure whats going on here? | |
| # new_account.name = "1 "+ company_name | |
| # new_account.save! | |
| # Create User |
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
| @media only screen and (max-device-width: 540px), only screen and (min-device-width: 560px) and (max-device-width: 1136px) and (-webkit-min-device-pixel-ratio: 2) { | |
| body { | |
| min-width: 320px !important; | |
| max-width: 320px !important; | |
| overflow: hidden; | |
| } | |
| .full-width{width:320px !important;} | |
| #main-outlet { | |
| padding-top: 95px !important; | |
| } |
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
| validate :is_employee, :on => :create | |
| def is_employee | |
| if self.email.split("@")[1] == Settings.company_domain | |
| #is employee, do nothing | |
| else | |
| # if i raise 'failed check'.inspect here I confirm that an @gmail.com does not satisfy the above conditional | |
| errors.add(:email, "Not VM employee") #but then no matter what I put here the record still saves | |
| 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
| def self.seed_from_csv(uri) | |
| CSV.read(uri).each do |row| | |
| @post = Post.find_or_create_by_identifier( | |
| :identifier => row[0], | |
| :content => row[1], | |
| :post_type => row[2], | |
| :posted_at => row[5], | |
| :post_impressions_unique => row[6], | |
| :post_impressions_organic_unique => row[7], |
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
| #directory_controller.rb | |
| class DirectoryController < UIViewController | |
| def viewDidLoad | |
| super | |
| self.title = "Directory" | |
| @table = UITableView.alloc.initWithFrame(self.view.bounds) | |
| self.view.addSubview @table | |
| @table.dataSource = self | |
| @table.delegate = self |