Skip to content

Instantly share code, notes, and snippets.

View vpoola88's full-sized avatar

Vivek Poola vpoola88

View GitHub Profile
const axios = require('axios');
const cheerio = require('cheerio');
function getTitles(url) {
let data;
axios.get(url)
.then(response => {
data = response.data
const $ = cheerio.load(data);
const titles = $('span.titleline')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="472px" height="89px" viewBox="0 0 472 89" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch -->
<title>the skyhoppr difference</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Home-Copy-3" transform="translate(-138.000000, -1635.000000)">
<g id="the-skyhoppr-difference" transform="translate(138.000000, 1635.000000)">
<path d="M21.375,54.72 C21.164999,54.5099989 20.7825028,54.2250018 20.2275,53.865 C19.6724972,53.5049982 18.997504,53.1525017 18.2025,52.8075 C17.407496,52.4624983 16.5450046,52.1700012 15.615,51.93 C14.6849954,51.6899988 13.7400048,51.57 12.78,51.57 C11.0699914,51.57 9.7950042,51.8849968 8.955,52.515 C8.1149958,53.1450031 7.695,54.0299943 7.695,55.17 C7.695,55.830003
class Airport < ActiveRecord::Base
has_many :origins
has_many :flights, through: :origins
has_many :destinations
has_many :flights, through: :destinations
end
class Destination < ActiveRecord::Base
2.2.1 :011 > recipe = Recipe.last
Recipe Load (0.3ms) SELECT "recipes".* FROM "recipes" ORDER BY "recipes"."id" DESC LIMIT 1
=> #<Recipe id: 6, title: "test recipe", image: "nothing", description: "test description for a recipe", created_at: "2015-11-25 03:54:33", updated_at: "2015-11-25 03:54:33">
2.2.1 :012 > Ingredient
=> Ingredient(id: integer, name: string, recipe_id: integer, created_at: datetime, updated_at: datetime)
=> Ingredient(id: integer, name: string, recipe_id: integer, created_at: datetime, updated_at: datetime)
2.2.1 :018 > Ingredient.last
Ingredient Load (0.2ms) SELECT "ingredients".* FROM "ingredients" ORDER BY "ingredients"."id" DESC LIMIT 1
=> #<Ingredient id: 2, name: "asdf", recipe_id: 5, created_at: "2015-11-20 04:13:53", updated_at: "2015-11-20 04:13:53">
➜ MIXX git:(development) rails c
Loading development environment (Rails 4.2.3)
2.2.1 :001 > Recipe
=> Recipe (call 'Recipe.connection' to establish a connection)
2.2.1 :002 > Recipe.create(title: 'test recipe', description: 'test description for a recipe', image: 'nothing')
(0.1ms) BEGIN
SQL (1.2ms) INSERT INTO "recipes" ("title", "description", "image", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["title", "test recipe"], ["description", "test description for a recipe"], ["image", "nothing"], ["created_at", "2015-11-25 03:54:33.034585"], ["updated_at", "2015-11-25 03:54:33.034585"]]
(0.5ms) COMMIT
=> #<Recipe id: 6, title: "test recipe", image: "nothing", description: "test description for a recipe", created_at: "2015-11-25 03:54:33", updated_at: "2015-11-25 03:54:33">
2.2.1 :003 > Recipe.last
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"font_options":
[
"gray_antialias"
],
"font_size": 16,
"hot_exit": false,
"ignored_packages":
# server-based syntax
# ======================
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:
# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
# server 'db.example.com', user: 'deploy', roles: %w{db}
server '52.89.55.107', user: 'deploy', roles: %w{web app db}
# Load DSL and set up stages
require 'capistrano/setup'
# Include default deployment tasks
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rvm'
require 'capistrano/rails/assets' # for asset handling add
require 'capistrano/rails/migrations' # for running migrations