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
| CREATE TABLE users ( | |
| id integer PRIMARY KEY, | |
| name string, | |
| email string | |
| ); | |
| CREATE TABLE questions ( | |
| id integer PRIMARY KEY, | |
| question varchar, |
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
| <% if user_signed_in? %> | |
| Logged in as <%= current_user.username %> | |
| <%= link_to 'Edit profile', edit_user_registration_path %> | | |
| <%= link_to "Logout", destroy_user_session_path, method: :delete %> | |
| <%= link_to 'View Your Collections', collections_path %> | |
| <% link_to 'New Collection', new_collection_path %> | |
| <% else %> | |
| <%= link_to "Sign up", new_user_registration_path %> | | |
| <%= link_to "Login", new_user_session_path %> | |
| <% 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
| <% @related_content.each do |content| %> | |
| <% if content.title.present? %> | |
| <%= content.title %> | |
| <% end %> | |
| <% if content.author.name.present? %> | |
| <%= content.author.name %> | |
| <% end %> | |
| <% if content.published_date.present? %> |
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 email | |
| content = Content.find(params[:id]) | |
| ClientMailer.content_send(current_user, content, params[:client_email], params[:client_note]).deliver | |
| if ClientMailer.deliver | |
| render :json => { :status => sent } | |
| else | |
| render :json => { :errors => errors.full_messages }, :status => 401 | |
| 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 contacts_callback | |
| @contacts = request.env['omnicontacts.contacts'] | |
| @user = request.env['omnicontacts.user'] | |
| puts "List of contacts of #{user[:name]} obtained from #{params[:importer]}:" | |
| @contacts.each do |contact| | |
| puts "Contact found: name => #{contact[:name]}, email => #{contact[:email]}" | |
| 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
| Search Engine Metadata: | |
| <meta name=“title” content=“GlutenFree.com” /> | |
| <meta name=“description” content=“GlutenFree.com seeks to provide anyone considering a gluten-free lifestyle the knowledge and confidence to embrace this bountiful life. We cut through the clutter by bringing together timely, credible research, recipes and tips and tools into a single, easy-to-digest resource.” /> | |
| <meta name=“keywords” content=“gluten,gluten free,gluten-free,gluten free diet food,celiac disease,about celiac disease,disease celiac,what is celiac disease,gluten sensitivity,gluten intolerance,gluten intolerant,foods for gluten free diet,foods on a gluten free diet,foods for a gluten free diet,gluten free diet food,gluten free claim,living gluten free” /> |
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
| $(document).off('keyup').on('keyup', function(e) { | |
| view.closeModalOnEsc(e); | |
| }); | |
| $('#overlay').show().on('click', function(e) { | |
| view.hideModal(e); | |
| }); | |
| $('#overlay').hide().off('click'); |
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
| GlutenFree.Views.GlutenFreeMeView = Backbone.View.extend({ | |
| 'events': { | |
| 'click .nav a': 'preventDefault', | |
| 'click .button a': 'navigate', | |
| 'click .email-menu': 'shareMenuEmail' | |
| }, | |
| 'initialize': function() { | |
| var view = this; |
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
| got it work sans plug in | |
| $.ajax({ | |
| type: "GET", | |
| dataType: "jsonp", | |
| cache: false, | |
| url: "https://api.instagram.com/v1/tags/" + 'budlight' + "/media/recent?client_id=" + '41e187d89f4b42b784804e0981f30c11', | |
| success: function(response) { | |
| var length = response.data != 'undefined' ? response.data.length : 0; | |
| var limit = 60 != null && 60 < length ? 60 : length; |
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
| var express = require("express"); | |
| var app = express(); | |
| var port = process.env.PORT || 8080; | |
| var io = require('socket.io').listen(app.listen(port)); | |
| var Instagram = require('instagram-node-lib'); | |
| var http = require('http'); | |
| var request = ('request'); | |
| var intervalID; | |
| /** |
OlderNewer