Skip to content

Instantly share code, notes, and snippets.

View arsenslyusarchuk's full-sized avatar

Arsen Slyusarchuk arsenslyusarchuk

View GitHub Profile
var webpack = require('webpack');
var path = require('path');
var loaders = require('./webpack.loaders');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
loaders.push({
test: /\.scss$/,
loader: ExtractTextPlugin.extract({fallback: 'style-loader', use : 'css-loader?sourceMap&localIdentName=[local]___[hash:base64:5]!sass-loader?outputStyle=expanded'}),
module.exports = [
{
test: /\.js?$/,
exclude: /(node_modules|bower_components|dist\/)/,
loader: "babel-loader"
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader?importLoaders=1'],
exclude: ['node_modules']
"use strict";
var webpack = require('webpack');
var path = require('path');
var loaders = require('./webpack.loaders');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var DashboardPlugin = require('webpack-dashboard/plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
const HOST = process.env.HOST || "127.0.0.1";
const PORT = process.env.PORT || "8888";
@arsenslyusarchuk
arsenslyusarchuk / app.ts
Last active August 18, 2016 13:40
Ionic.beta-11 login page
import {Component, OnInit, ViewChild} from '@angular/core';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
import {Platform, ionicBootstrap, MenuController, Nav, Tabs } from 'ionic-angular';
import {StatusBar} from 'ionic-native';
import {ReceiptsPage} from './pages/receipts/receipts';
import {LoginPage} from './pages/login/login';
import {AboutPage} from './pages/about/about';
import {ContainerPage} from './pages/container/container';
import {Auth} from './services/auth';
import {HttpClient} from './services/http-client';
puts 'say your name'
name = $stdin.gets.chomp
str = %{
<!DOCTYPE html>
<html>
<body>
<div style='height:160px;float:left'>
<h2>Hello, my name is</h2>
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = core, pg_catalog;
--
-------------------------------- Order creation -------------------------------------------
Order statuses:
* pending - rider just created order (no driver assigned). Waiting for rider to accept
* accepted - driver has accepted order (order is in progress)
* completed - order was completed and closed
On rider dashboard there is inactive by default "Create order" button
After rider has pressed "Plan route" button, "Create order" button becomes active
After rider has pressed "Create order" button, modal window appears
@arsenslyusarchuk
arsenslyusarchuk / oop_test.rb
Last active May 18, 2016 20:16
LITS OOP test
1. OOP is based on the concept of:
* classes
* objects
* messages
2. What does the letter "S" means in SOLID principles?
* interface segregation principle
* open/closed principle
* single responsibility principle
@arsenslyusarchuk
arsenslyusarchuk / ruby_syntax_test.txt
Last active April 29, 2016 06:59
Small test on Ruby Syntax for LITS
1. What is the console output of the following statement?
'Hello' + 123
* 'Hello123'
* 256
* TypeError: can't convert Fixnum into String
2. What is the console output of the following statement?
a = 1
a = "Symbol"
a = :a
@arsenslyusarchuk
arsenslyusarchuk / prepend_include.rb
Last active March 13, 2017 14:46
Prepend Include homework
# In this task you should use #prepend and #include methods
# in different combinations to achieve desired result, described at the bottom
# Hint: class method #ancestors should help you to understand ancestors chain in different cases
# Good Luck!
module A
def hello
super if defined?(super)
puts "hello from A"
end