- Two
- Two
- Three
- Four
View test.md
View anything
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyOtherVariable = 39km |
View lambda.webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const { readdirSync } = require('fs'); | |
const exec = require('child_process').execSync; | |
const dir = 'src' | |
const entry = readdirSync(dir) | |
.filter(item => /\.(t|j)s$/.test(item)) | |
.filter(item => !/\.d\.(t|j)s$/.test(item)) | |
.reduce((acc, fileName) => ({ | |
...acc, |
View aws-lambda-api-gateway.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "eu-west-1" | |
profile = "my-profile" | |
} | |
resource "aws_iam_role" "iam_for_lambda" { | |
name = "iam_for_lambda" | |
assume_role_policy = <<EOF | |
{ |
View gist:5dcd61a91f5d3072289022977f565faf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EditorState, Modifier } from 'draft-js'; | |
import { TAB_CHARACTER } from './CONSTANTS'; | |
const changeIndent = (editorState, isDedent) => { | |
const selection = editorState.getSelection(); | |
const contentState = editorState.getCurrentContent(); | |
let blockMap = contentState.getBlockMap(); | |
const blockKeys = blockMap.keySeq(); | |
const selectionStartKey = selection.getStartKey(); | |
const selectionEndKey = selection.getEndKey(); |
View ClientRect.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PureComponent } from 'react' | |
/* | |
* PollBounds | |
* render with referenced element measurements | |
* @param measureRef: React.Ref | |
* @param pollTime: number - polling time for polling client rect | |
* @param children({ bounds }) | |
*/ |
View render-observable.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RenderObservable | |
observable={interval(2000).pipe(startWith(0))} | |
> | |
{({ value, value$ }) => <div> | |
<Number>Value of {value}</Number> | |
<RenderObservable | |
observable={value$ && merge(value$, interval(300))} | |
> | |
{({ value }) => <Number>Value of {value}</Number>} | |
</RenderObservable> |
View react-rxjs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import { interval } from 'rxjs' | |
class RenderObservable extends Component { | |
state = { | |
value: null | |
} |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Configure these parameters to crawl for your statements */ | |
const userId = '<your-user-id>'; | |
const password = '<your-password>'; | |
const secret = '<your-secret>'; | |
const dateStringUntil = '<date>'; | |
const Nightmare = require('nightmare'); | |
const nightmare = Nightmare({ show: true }); | |
const createCsvWriter = require('csv-writer').createObjectCsvWriter; |
View djsp-mentions-example.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { EditorState } from 'draft-js-plugins'; | |
import Editor from 'djsp.editor'; | |
import autocompletePlugin from 'djsp.autocomplete'; | |
import selectionPositionPlugin from 'djsp.selection-position'; | |
import entityDecoratorPlugin from 'djsp.entity-decorator'; | |
import Popover from 'djsp.popover'; | |
import ListBox from 'djsp.listbox'; | |
import addEntity from 'djsp.add-entity'; |
NewerOlder