Skip to content

Instantly share code, notes, and snippets.

Avatar

Archakov Dennis Archakov06

View GitHub Profile
View Answer.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\User;
use App\Question;
use App\UploadedFile;
class Answer extends Model
View AudioPlayer.js
import React from 'react';
import styled from 'styled-components';
import { Sprites } from './';
import { COLORS } from '../constants/styles';
const AudioBlock = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
width: 300px;
View Button.js
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import PlusIcon from 'react-icons/lib/fa/plus';
import CheckIcon from 'react-icons/lib/fa/check';
import { COLORS } from '../constants/styles';
const StyledButton = styled.button`
display: flex;
View datasource.json
[
{
"data": [
{
"date": "Friday, 1st December 2017",
"day": "1",
"fullName": "Demo Master",
"phone": null,
"serviceName": "Proverka",
},
View method.js
import Room from '../models/Room';
import { isEmpty, shuffle } from 'lodash';
import wordsList from '../public/words';
class RoomController {
get(req, res, next) {
const { room } = req.params;
Room.find({ room }, (err, room) => {
if (!err && !isEmpty(room)) {
res.json(room);
View server.js
// config.js
const merge = require('lodash').merge;
const config = {
// Common configuration section
sentry: {
url: 'https://',
},
mongodbUri: 'mongodb://',
url: global.hasOwnProperty('location') ? global.location.origin + '/' : '',
View server.js
// app.js
import express from 'express';
import bodyParser from 'body-parser';
import methodOverride from 'method-override';
import session from 'express-session';
import cookieParser from 'cookie-parser';
import errorHandler from 'errorhandler';
import morgan from 'morgan';
import flash from 'connect-flash';
View es6-sort-object.js
Object.keys(tags)
.sort((a, b) => tags[a] - tags[b])
.reverse()
.map((name, i) => ({ [name]: tags[name] }))
// before: {a: 3, b: 4, c: 2: d: 1}
// after: {b: 4, a: 3, c: 2, d: 1}
View myfunction.js
$scope.getProblematics = function(callback) {
var url = $scope.makeAPI('/problematics');
$http.get(url, {
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"auth_token": $.cookie('auth_token')
}
@Archakov06
Archakov06 / js-task-1.md
Created Feb 10, 2017 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)
View js-task-1.md