Skip to content

Instantly share code, notes, and snippets.

View MariMax's full-sized avatar
💨

Maxim MariMax

💨
View GitHub Profile
module.exports = {
devServer: {
proxy: {
'^/api': {
target: 'api/url',
},
'^/api2': {
target: 'different/api/url',
},
},
import axios, {AxiosRequestConfig, AxiosResponse, AxiosError} from 'axios';
import Toasted from 'vue-toasted';
import Vue from 'vue';
import {COMMON_TOAST_DELAY} from '@/config/common-constants';
Vue.use(Toasted);
export const domainUrl = 'https://api.takemobi.com/';
export const baseURL = `${domainUrl}`;
import {Inject, Injectable} from '@angular/core';
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
import {from as fromPromise, Observable, Subject, throwError} from 'rxjs';
import {catchError, map, switchMap, tap} from 'rxjs/operators';
import {ToasterService} from '../../../shared/toaster/toaster.service';
import {ToasterTypes} from '../../../shared/toaster/toaster-types.enum';
import {XsrfHolderService} from '../../xsrf-holder/xsrf-holder.service';
import {readFileAsText} from '../../../shared/utils/read-file';
import {CustomEncoder} from '../../custom-encoder/custom-encoder';
@MariMax
MariMax / watercanvas.js
Created December 14, 2018 16:44 — forked from liquidzym/watercanvas.js
water canvas by Almer Thie http://code.almeros.com
/*
* Water Canvas by Almer Thie (http://code.almeros.com).
* Description: A realtime water ripple effect on an HTML5 canvas.
* Copyright 2010 Almer Thie. All rights reserved.
*
* Example: http://code.almeros.com/code-examples/water-effect-canvas/
* Tutorial: http://code.almeros.com/water-ripple-canvas-and-javascript
*/
#!/bin/sh
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin
policies_store="/Library/Managed Preferences"
users_dir="/Users"
policies="com.google.Chrome.plist com.google.Keystone.Agent.plist com.apple.icloud.managed.plist com.apple.preferences.users.plist"
#####################################################
script_name=`basename $0`
current_date=`date`
@MariMax
MariMax / dabblet.css
Created January 28, 2018 03:45
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
function rightHandler() {
cy.get('.navigate-right')
.then(rightBtn => {
if (rightBtn.attr('disabled')) {
downHandler(true);
} else {
cy.screenshot()
.then(() => {
cy.wrap(rightBtn).click();
downHandler();
module.exports = {
/**
*
* Using raw socket.io functionality from a Sails.js controller
*
*/
index: function (req,res) {
@MariMax
MariMax / factoryTemplate.js
Last active August 29, 2015 14:10
factoryTemplate
(function(angular, _) {
'use strict';
function factory() {
return {
mapRequest: function(request) {
var serverModel = {};
serverModel.SearchString = request.searchString;
serverModel.Offset = request.offset;
serverModel.RowsCount = request.count;
@MariMax
MariMax / directiveTemplate.js
Last active August 29, 2015 14:10
directiveTemplate
(function(angular){
'use strict';
function directiveFactory(){
function linkFunction(){
}
return {
restrict: 'EA',
replace:true,