Skip to content

Instantly share code, notes, and snippets.

{
meta: {
code: 200
requestId: "5997a3b46a607177020c4a1d"
}
notifications: [
{
type: "notificationTray"
item: {
unreadCount: 1
{
"code": 200,
"data": {
"location": {
"_id": "65559",
"has_menus": true,
"published_at": "2013-09-06T12:13:47",
"out_of_business": false,
"has_hours": true,
"location": {
import {
GraphQLBoolean,
GraphQLEnumType,
GraphQLFloat,
GraphQLInputObjectType,
GraphQLInt,
GraphQLInterfaceType,
GraphQLList,
GraphQLObjectType,
GraphQLString,
function ignoreThisMessage(isUncaught, args, payload) {
var ignore = "Protocols, domains, and ports must match.";
if (
payload &&
payload.body &&
payload.body.message &&
payload.body.message.body &&
!!~payload.body.message.body.indexOf(ignore)
) {
return true
/**
* MONGOSE SCHEMA
* [questions-schema.js]
*/
import mongoose from 'mongoose';
const selectSchema = {
value: String,
label: String
};
@sarkistlt
sarkistlt / weather.jsx
Last active May 10, 2016 17:40
React component with weather-widget
/* Import variables ***************************************************************************************************/
import React from 'react';
import ReactDOM from 'react-dom';
/* React components ***************************************************************************************************/
export default class Weather extends React.Component{
constructor(props) {
super(props);
this.state = {
city: ``,
@sarkistlt
sarkistlt / synacor_weather.js
Created May 7, 2016 21:57
native javaScript ES6. just insert this file in any HTML and js will do rest of work.
let XHR = (`onload` in new XMLHttpRequest()) ? XMLHttpRequest : XDomainRequest; //to support IE8
let ipXhr = new XHR(),
weatherXhr = new XHR();
let creatElement = function () {
let layoutBody = document.createElement('div'),
h1 = document.createElement('h1'),
p = document.createElement('p'),
img = document.createElement('img'),
h2 = document.createElement('h2');
@sarkistlt
sarkistlt / module-example.jsx
Last active May 3, 2016 06:47
Used technologies: MeteorJs, ReactJs, NodeJs, Bootstrap, react-Bootstrap. How you can see, the whole Web application created with separate modules. Each modules include his own dependencies and can easily be used in other projects. I don't use RequireJs, because I work with MeteorJs which allow me to work with NodeJs using ES6 syntaxes.
/* Import variables ***************************************************************************************************/
import React from 'react';
import ReactDOM from 'react-dom';
import {composeWithTracker} from 'react-komposer';
import {Modal, Button} from 'react-bootstrap';
import './deposit.css';
/* React components ***************************************************************************************************/
const Deposit = (props) => {
@sarkistlt
sarkistlt / Sample.js
Created April 1, 2016 21:01
DIRECTV_test-task
"use strict"
window.onload = () => {
let image2Src = null,
elem = document.getElementById('mainDiv'),
getImage1btn = document.createElement('button'),
getImage2btn = document.createElement('button');
getImage1btn.innerHTML = 'getImage1Data';
getImage2btn.innerHTML = 'getImage2Data';
@sarkistlt
sarkistlt / Sample.css
Created April 1, 2016 20:59
DIRECTV_test-task
#mainDiv {
height: 100vh;
width: 100vw;
border: 1px solid red;
}
#innerDiv {
height: 100vh;
width: 100vw;
border: 1px solid green;