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
const { exec } = require('child_process') | |
const { promisify } = require('util') | |
const chalk = require('chalk') | |
// See: https://docs.npmjs.com/about-audit-reports#severity | |
const SEVERITY_LEVELS = ['low', 'moderate', 'high', 'critical'] | |
const SEVERITY_THRESHOLD = 'critical' | |
const run = promisify(exec) | |
// Get the output of a command. If the command exits with a non-zero code, try |
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
import React from 'react'; | |
import { compose, withState, withHandlers } from 'recompose'; | |
const Checkbox = ({ isChecked, handleClick }) => ( | |
<input | |
type="checkbox" | |
checked={isChecked} | |
onClick={handleClick} | |
/> | |
); |
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
import Logger from "../Logger/Logger"; | |
import * as FormData from "form-data"; | |
class RequestNormalizer { | |
private policyTransformer: string = "json"; | |
public convertToFormData(data) { | |
if (data.hasOwnProperty("attachment") === true) { | |
const formData = new FormData(); |
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
const Promise = require('bluebird'); | |
const ObjectId = require('sails-mongo/node_modules/mongodb').ObjectID; | |
/** | |
* Advertises a video. | |
* Creates adset, adcreatives, ads and links it to existing compaign and account | |
* | |
* @param {string} postMessage in the ad post | |
* @param {object} place {lat, lng, radius} | |
* @param {object} time {startTime, endTime} like 2015-12-16 22:59:59 UTC or Unix time |
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
const app_root = 'src'; // the app root folder: src, src_users, etc | |
const path = require('path'); | |
const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const fontLoader = require('font-awesome-sass-loader'); | |
module.exports = { | |
app_root: app_root, | |
entry: [ |
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
const app_root = 'src'; // the app root folder: src, src_users, etc | |
const path = require('path'); | |
const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
app_root: app_root, | |
entry: [ | |
'webpack-dev-server/client?http://localhost:3005', |
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
export function signUp (data) { | |
return async dispatch => { | |
debugger; | |
const response = await httpPost('/auth/signup', data); | |
if (response.status !== 200) { | |
debugger; | |
dispatch({ | |
type: Constants.REGISTRATIONS_ERROR, |
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
export function checkToken () { | |
return async dispatch => { | |
const response = await httpGet(`/auth/validate-access-token/${localStorage.getItem('AuthToken')}`); | |
if (response.status !== 200) { | |
localStorage.removeItem('AuthToken'); | |
dispatch({ | |
type: Constants.TOKEN_ERROR, |
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
//***********scss*************** | |
// Создаем mixin | |
@mixin respond-to($media) { | |
@if $media == handhelds { | |
@media only screen and (max-width: 479px) { @content; } | |
} | |
@else if $media == wide-handhelds { | |
@media only screen and (min-width: 480px) and (max-width: 767px) { @content; } | |
} | |
@else if $media == tablets { |
NewerOlder