Skip to content

Instantly share code, notes, and snippets.

View jurajkrivda's full-sized avatar
💭
Hi there

Juraj Krivda jurajkrivda

💭
Hi there
  • Prague
View GitHub Profile
@jurajkrivda
jurajkrivda / networkInterface.js
Created March 10, 2017 22:41
Custom Apollo/Graphql network interface
import { printAST } from 'apollo-client';
import Config from 'react-native-config';
const isConnected = true;
export default () => {
return {
async query(request) {
if (!isConnected) {
return new Promise.reject(new Error('no-connection'))
@jurajkrivda
jurajkrivda / # php71 - 2016-10-17_13-14-50.txt
Created October 17, 2016 11:15
php71 (homebrew/php/php71) on macOS 10.12 - Homebrew build logs
Homebrew build logs for homebrew/php/php71 on macOS 10.12
Build date: 2016-10-17 13:14:50
@jurajkrivda
jurajkrivda / calendar.js
Last active July 27, 2016 17:57
Reactive fullcalendar
Template.Calendar.onCreated(function () {
const instance = this;
instance.viewDate = new ReactiveVar();
instance.autorun(() => {
const viewDate = instance.viewDate.get();
if (typeof viewDate !== 'undefined') {
const startDate = Math.round(viewDate.start / 1000);
@jurajkrivda
jurajkrivda / maintenance.js
Created August 20, 2015 09:46
reactive var
Template.maintenance.onCreated(function() {
this.subscribed = new ReactiveVar(false);
this.errorMessage = new ReactiveVar(null);
this.subscribing = new ReactiveVar(false);
});
Template.maintenance.helpers({
'subscribed': function () {
return Template.instance().subscribed.get();
},