Skip to content

Instantly share code, notes, and snippets.

View ispyinternet's full-sized avatar

Richard O'flynn ispyinternet

View GitHub Profile
@ispyinternet
ispyinternet / request.ts
Last active October 2, 2020 10:18
request.ts
import { pipe, fromValue, concat, map, subscribe } from 'wonka';
import { DocumentNode } from 'graphql';
import { request$, Request$ } from './request';
import { context$, Context$ } from './context';
import { source$ } from './source';
import { writable, derived, Writable, Readable } from 'svelte/store';
import { OperationContext, RequestPolicy } from '@urql/core';
export interface QueryArgs {
@ispyinternet
ispyinternet / gist:4da69f0be9145250ba27d61e69f1f76e
Created May 1, 2019 09:18
sapper / aws-serverless-express
'use strict'
if (process.env.DEBUG == 'development') {
setTimeout(() => { console.log("ENV", process.env) }, 1000);
}
import sirv from 'sirv';
import express from 'express';
import { Store } from 'svelte/store.js';
import session from './DynamoDBSession.js';
import * as sapper from '../__sapper__/server.js';
import fetch from 'node-fetch';
@ispyinternet
ispyinternet / gist:18aaa337ba044668c9dcf160cf6f6eb6
Created May 1, 2019 09:14
sapper / aws-serverless-express
'use strict'
process.env.SAPPER_DEST = __dirname + "/__sapper__/build";
import app from './__sapper__/build/server/server.js';
import awsServerlessExpress from 'aws-serverless-express';
exports.handler = (event, context) => {
console.log(event);
@ispyinternet
ispyinternet / page.json
Created August 14, 2018 03:03
sapper (working)
{
"page": {
"pattern": {},
"parts": [null, {
"name": "blog_$slug",
"component": {
"filename": "/home/richard/TestCognito/Project/Server/Cognito/routes/blog/[slug].html",
"css": {
"code": ".content.svelte-gnxal1 h2{font-size:1.4em;font-weight:500}.content.svelte-gnxal1 pre{background-color:#f9f9f9;box-shadow:inset 1px 1px 5px rgba(0,0,0,0.05);padding:0.5em;border-radius:2px;overflow-x:auto}.content.svelte-gnxal1 pre code{background-color:transparent;padding:0}.content.svelte-gnxal1 ul{line-height:1.5}.content.svelte-gnxal1 li{margin:0 0 0.5em 0}",
"map": "{\"version\":3,\"file\":\"[slug].html\",\"sources\":[\"[slug].html\"],\"sourcesContent\":[\"<svelte:head>\\n\\t<title>{post.title}</title>\\n</svelte:head>\\n\\n<h1>{post.title}</h1>\\n\\n<div class='content'>\\n\\t{@html post.html}\\n</div>\\n\\n<style>\\n\\t/*\\n\\t\\tBy default, CSS is locally scoped to the component,\\n\\t\\tand any unused styles are dead-code-eliminated.\\n\\t\\tIn this page, Svelte can't know which elements
@ispyinternet
ispyinternet / request.json
Created August 14, 2018 02:49
sapper request
{
"page": {
"pattern": {},
"parts": [null, {
"name": "blog_$slug",
"component": {
"filename": "/home/richard/TestCognito/Project/Server/Cognito/routes/blog/[slug].html",
"css": {
"code": ".content.svelte-gnxal1 h2{font-size:1.4em;font-weight:500}.content.svelte-gnxal1 pre{background-color:#f9f9f9;box-shadow:inset 1px 1px 5px rgba(0,0,0,0.05);padding:0.5em;border-radius:2px;overflow-x:auto}.content.svelte-gnxal1 pre code{background-color:transparent;padding:0}.content.svelte-gnxal1 ul{line-height:1.5}.content.svelte-gnxal1 li{margin:0 0 0.5em 0}",
"map": "{\"version\":3,\"file\":\"[slug].html\",\"sources\":[\"[slug].html\"],\"sourcesContent\":[\"<svelte:head>\\n\\t<title>{post.title}</title>\\n</svelte:head>\\n\\n<h1>{post.title}</h1>\\n\\n<div class='content'>\\n\\t{@html post.html}\\n</div>\\n\\n<style>\\n\\t/*\\n\\t\\tBy default, CSS is locally scoped to the component,\\n\\t\\tand any unused styles are dead-code-eliminated.\\n\\t\\tIn this page, Svelte can't know which elements
@ispyinternet
ispyinternet / request.json
Created August 14, 2018 02:49
sapper request
{
"page": {
"pattern": {},
"parts": [null, {
"name": "blog_$slug",
"component": {
"filename": "/home/richard/TestCognito/Project/Server/Cognito/routes/blog/[slug].html",
"css": {
"code": ".content.svelte-gnxal1 h2{font-size:1.4em;font-weight:500}.content.svelte-gnxal1 pre{background-color:#f9f9f9;box-shadow:inset 1px 1px 5px rgba(0,0,0,0.05);padding:0.5em;border-radius:2px;overflow-x:auto}.content.svelte-gnxal1 pre code{background-color:transparent;padding:0}.content.svelte-gnxal1 ul{line-height:1.5}.content.svelte-gnxal1 li{margin:0 0 0.5em 0}",
"map": "{\"version\":3,\"file\":\"[slug].html\",\"sources\":[\"[slug].html\"],\"sourcesContent\":[\"<svelte:head>\\n\\t<title>{post.title}</title>\\n</svelte:head>\\n\\n<h1>{post.title}</h1>\\n\\n<div class='content'>\\n\\t{@html post.html}\\n</div>\\n\\n<style>\\n\\t/*\\n\\t\\tBy default, CSS is locally scoped to the component,\\n\\t\\tand any unused styles are dead-code-eliminated.\\n\\t\\tIn this page, Svelte can't know which elements
---
AWSTemplateFormatVersion: "2010-09-09"
Description: "Create a Lambda function that will take a comma seperated list of key=value pairs and return an array of key value pairs that can then be used in cloudformation tags resource parameter"
Resources:
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
<!-- App.html -->
<h1>Hello {{$name}}!</h1>
<Foo/>
<script>
import Foo from './Foo.html';
export default {
components: { NameInput }
};
.DS_Store
node_modules
@ispyinternet
ispyinternet / gist:9dc7395f958e160be84c
Last active March 7, 2016 10:44
DI Woes in angluar2
import sharedClass from 'sharedClass';
import childComponent from 'childComponent';
import serviceClass from 'serviceClass';
@Component({
selector: 'comp1',
providers: [sharedClass,childComponent,serviceClass],
template: '<h1>{title}</h1>'
})