Skip to content

Instantly share code, notes, and snippets.

@aqwert
aqwert / MonthCalendar.ux
Last active February 22, 2017 02:52
Fuse Basic Month Calendar Control
<Panel ux:Class="MonthCalendar">
<object ux:Property="CurrentDate" />
<JavaScript>
var self = this;
var Observable = require("FuseJS/Observable");
var moment = require("moment.js");
calendar = require("calendar.js");
var today = moment().local().startOf('day');
@aqwert
aqwert / Page.ux
Last active March 15, 2020 00:27
Fuse SwipeItem
...
<SwipeItem ItemText="Swiped Item">
<Panel ux:Template="Content" Height="50" Padding="10" Margin="10" >
<Rectangle Layer="Background" CornerRadius="8" Background="White">
<Stroke Width="1" Color="{Resource DividerColor}"> </Stroke>
</Rectangle>
<Text Alignment="Center">Home Page Swipe</Text>
</Panel>
<StackPanel Orientation="Horizontal" ux:Template="ActionRight" >
<Panel Background="Green" Clicked="{editItem}" MinWidth="60" >
@aqwert
aqwert / Startup.cs
Created April 18, 2017 22:51
ASPNetCore Change response via Middleware
namespace Project
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
//...
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
@aqwert
aqwert / array_manipulation.js
Created June 8, 2017 04:40
Javascript immutable array manipulation
//Adding to an array without mutating the original
return list.concat(item);
//---------------------------------------------------------
//Deleting an item in an array without mutating the original
return list
.slice(0, index)
.concat(list.slice(index + 1));
@aqwert
aqwert / TeamList.js
Last active May 22, 2021 17:23
Example of React-native with Redux and GraphQL
//component to render a list of teams... (slimmed down)
import React, { Component, } from 'react'
import { ScrollView, View } from 'react-native';
import { connect } from 'react-redux';
import TeamCard from './teamCard';
var _ = require('lodash');
const ios = Platform.OS === 'ios';
049871eaa624bc5f896ebab794204be887f45d9f5776a272eb80524dfd6e2460c8fbd6645154060b4206bda2279c2be64fb2b7633e742bbca21bbd7fc239c0ff10
@aqwert
aqwert / ReadMe.md
Last active November 9, 2019 18:22
GraphQL Schema stiching

NOTE:

Although this is a gist with accompanied files, I will at some stage make a proper project with working parts.

Getting Started with a Graphql Microservice

This is an opinionated view of how to use Prisma Graphql backend in a microservice way. The idea is that each Graphql Micorservice has both a App GraphQL service (the one that creates a public API) and a Prisma GraphQL service (The one that is a ORM to a DB expiosing GraphQL CRUD, filtering and ordering operations). Each of these microservices are then "stitched" together to form a single GraphQL App Service (Like a Backend For Frontend service BFF) that the client consumes.

Creating a GraphQL Microservice