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
{ | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "./tsconfig.json", | |
"tsconfigRootDir": "." | |
}, | |
"env": { | |
"browser": true, | |
"jest/globals": true | |
}, |
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 λ from "apex.js"; | |
import { Pool } from "pg"; | |
// connection details inherited from environment | |
const pool = new Pool({ | |
max: 1, | |
min: 0, | |
idleTimeoutMillis: 120000, | |
connectionTimeoutMillis: 10000 | |
}); |
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
// Feedback requested on the useDeepCompareEffect | |
// it just feels like a bit of work... | |
// HERE'S THE REASON I NEED THIS: | |
// when people use the useQuery hook, they'll typically | |
// do so like this: `useQuery(myQuery, {var1: props.value})` | |
// which means that passing `variables` to `useEffect` will | |
// trigger a rerun of the callback even if they didn't | |
// actually change (referrential equality) | |
function useQuery({query, variables}) { |
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
# This example using | |
# Nim: 0.18.0 | |
# Jester: 0.2.1 | |
# Using Jester >= 0.3.0 is preferrable if your Nim version > 0.18.0 | |
# In case you're using Jester >= 0.3.0, look the syntax different | |
# in its example because it's not backward compatible | |
import db_sqlite, asyncdispatch, json, strformat, strutils, sequtils | |
import jester |
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
{ | |
"name": "sqip-cache-tryout", | |
"version": "1.0.0", | |
"description": "", | |
"main": "", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "stefan judis <stefanjudis@gmail.com>", |
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
div, span { | |
box-sizing: border-box; | |
position: relative; | |
display: flex; | |
flex-direction: column; | |
align-items: stretch; | |
flex-shrink: 0; | |
align-content: flex-start; |
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 * as React from 'react'; | |
import { hot } from 'react-hot-loader'; | |
import { Provider } from 'react-redux'; | |
import DevTools from '../Devtools'; | |
import configureStore from '../../store/configureStore'; | |
import App from '../App'; | |
import ApplicationState from '../../store/store.types'; | |
import { fetchAuth } from '../../store/common/Auth/Auth'; |
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' | |
import Grid from 'material-ui/Grid' | |
import { CardNumberElement, CardExpiryElement, CardCVCElement } from 'react-stripe-elements' | |
import StripeElementWrapper from './StripeElementWrapper' | |
export default class extends PureComponent { | |
static displayName = 'StripeCardsSection' |
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
#! /bin/bash | |
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION | |
# Developed for DSM 6 - 7.0.1. Not tested on other versions. | |
# Steps to install | |
# Save this script in one of your shares | |
# Edit it according to your requirements | |
# Backup /usr/syno/share/nginx/ as follows: | |
# # cd /usr/syno/share/ | |
# # tar cvf ~/nginx.tar nginx |
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
// This is an advanced example! It is not typically required for application code. | |
// If you are using a library like Redux or MobX, use the container component provided by that library. | |
// If you are authoring such a library, use the technique shown below. | |
// This example shows how to safely update subscriptions in response to props changes. | |
// In this case, it is important to wait until `componentDidUpdate` before removing a subscription. | |
// In the event that a render is cancelled before being committed, this will prevent us from unsubscribing prematurely. | |
// We also need to be careful about how we handle events that are dispatched in between | |
// `getDerivedStateFromProps` and `componentDidUpdate` so that we don't put stale values into the `state`. |