Skip to content

Instantly share code, notes, and snippets.

View Verkalets's full-sized avatar
🚀
Deliver amazing products with best engineering teams

Ivan Verkalets Verkalets

🚀
Deliver amazing products with best engineering teams
View GitHub Profile
@Verkalets
Verkalets / test.js
Created March 29, 2022 09:25
test gist
console.log('test');
@Verkalets
Verkalets / episodes.json
Created March 31, 2020 17:40
episodes.json
[
{
"show_title": "Stranger Things",
"show_season": 1,
"episode_number": 1,
"episode_title": "Chapter One: The Vanishing Of Will Byers",
"episode_description": "On his way home from a friend's house, young Will sees something terrifying. Nearby, a sinister secret lurks in the depths of a government lab.",
"episode_image": "https://m.media-amazon.com/images/M/MV5BMTUwNTE0ODYzOF5BMl5BanBnXkFtZTgwOTc0ODE0OTE@._V1_UX224_CR0,0,224,126_AL_.jpg"
},
{
@Verkalets
Verkalets / shows.json
Created March 31, 2020 17:39
shows.json
[
{
"show_title": "Stranger Things",
"show_title_url": "https://reelgood.com/show/stranger-things-2016",
"show_maturity_rating": "Rated: 14+ (TV-14)",
"show_genre": "Drama, Fantasy, Horror, Mystery, Science Fiction, Thriller, Action & Adventure",
"show_length": "30m",
"show_year": 2016,
"show_imdb": "8,8",
"show_description": "When a young boy vanishes, a small town uncovers a mystery involving secret experiments, terrifying supernatural forces, and one strange little girl.",
@Verkalets
Verkalets / users.json
Created March 31, 2020 17:37
users.json
[
{
"User": "Jeff",
"Email": "jeffsherwin@gmail.com",
"": "",
"__1": "",
"__2": ""
},
{
"User": "Carrie",
@Verkalets
Verkalets / Description.md
Created March 22, 2017 11:33 — forked from taras2358/Description.md
Rails e-commerce exercise

Given you have Rails e-commerce website. There are Product and Category models which have has_and_belongs_to_many relationship.

models/product.rb

class Product
  has_and_belongs_to_many :categories
end

models/category.rb

<option value="Europe/Belgrade">Europe/Belgrade (Central European Time)</option>
<option value="Europe/Berlin">Europe/Berlin</option>
<option value="Europe/Bratislava">Europe/Bratislava (Central European Time)</option>
<option value="Europe/Brussels">Europe/Brussels (Central European Time)</option>
<option value="Europe/Budapest">Europe/Budapest (Central European Time)</option>
<option value="Europe/Copenhagen">Europe/Copenhagen (Central European Time)</option>
<option value="Europe/Gibraltar">(GMT+1:00) Europe/Gibraltar (Central European Time)</option>
<option value="Europe/Ljubljana">(GMT+1:00) Europe/Ljubljana (Central European Time)</option>
<option value="Europe/Luxembourg">(GMT+1:00) Europe/Luxembourg (Central European Time)</option>
<option value="Europe/Madrid">(GMT+1:00) Europe/Madrid
@Verkalets
Verkalets / models_list
Last active August 29, 2015 14:14
Models List
Models
Fee Complete S
Distribution Complete S
BPCTeam Validation V
ArFile Complete V
class ModelsPersistors::Crunchbase::Person
@@neo = Neography::Rest.new
def initialize(json_data)
data = json_data["data"]
@uuid = data["uuid"]
save(data)
end
class App.Views.Expences extends Backbone.View
template: HandlebarsTemplates['app/templates/expences']
events:
'click a#new_expence': 'newExpence'
initialize: ->
@listenTo @collection, 'reset', @render
@listenTo App.Vent, 'expence:create', @addToCollection
class CitiesController < ApplicationController
before_action :set_city, only: [:show, :edit, :update, :destroy, :map_cities, :blog_cities]
load_and_authorize_resource param_method: :my_sanitizer
# GET /cities
# GET /cities.json
def index
@cities = City.all
@deals = Hotel.where(deals: true).where(published: true).limit(3)
@cities_by_rating = City.asc(:rating).limit(3)