View server.ts
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 { createRequestHandler } from "./streaming-lambda.ts"; | |
import * as build from "@remix-run/dev/server-build"; | |
export const handler = awslambda.streamifyResponse( | |
createRequestHandler({ | |
build, | |
mode: process.env.NODE_ENV, | |
}) | |
); |
View gist:327c91bb8ec875120a71
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
217 Terry FM | |
170 AutoPlay | |
16 Machine Gun Kelly - General Admission | |
15 The Game - The Documentary 2.5 | |
14 J. Cole - 2014 Forest Hills Drive | |
13 Grieves - Winter & The Wolves [Deluxe Version] | |
12 The Game - 100 (feat. Drake) | |
12 Joey Bada$$ - B4.DA.$$ | |
10 Kenn Starr - Square One | |
9 The Weeknd - Kiss Land |
View a.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
function foo(...args) { | |
const [state, action] = args; | |
} | |
function bar(...args) { | |
const state = args[0]; | |
const action = args[1]; | |
} |
View 0_example.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 { createStore, applyMiddleware, compose } from 'redux'; | |
import request from 'superagent-es6-promise'; | |
import thunkMiddlware from 'redux-thunk'; | |
import promiseMiddleware from 'redux-promise'; | |
import logMiddleware from './middleware/log'; | |
import requestMiddleware from './middleware/request'; | |
// Create request middleware with our execute logic, return promise. | |
const executeRequestMiddleware = requestMiddleware((req, getState) => { | |
const { session: { token } } = getState(); |
View 0_concept.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 composedCreateStore = compose( | |
applyMiddleware( | |
thunkMiddleware, | |
dispatchIdMiddleware, | |
webWorkerMiddleware('/build/worker.js'), | |
() => promiseMiddleware, | |
loggerMiddleware | |
), | |
createStore | |
); |
View 0_usage.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 { createStore } from 'redux'; | |
import { performanceMiddleware, performanceReducer, performancePrintTable } from './redux/util/performance'; | |
import thunkMiddleware from 'redux/lib/middleware/thunk'; | |
import promiseMiddleware from './redux/middleware/promiseMiddleware'; | |
import * as reducers from './reducers/index'; | |
// Util functions. | |
function asyncAction(promise, request, success, failure) { | |
return { types: [request, success, failure], promise }; | |
} |
View gist:fb491c2b7598b664a219
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
<?php | |
/** | |
* Implements hook_search_api_elasticsearch_fields_updated_alter(). | |
*/ | |
function search_api_et_elasticsearch_search_api_elasticsearch_fields_updated_alter(SearchApiIndex $index, &$fieldsUpdatedProperties) { | |
if ($index->item_type === 'search_api_et_node') { | |
$fieldsUpdatedProperties['id']['type'] = 'string'; | |
} | |
} |
View TranslatableTrait.php
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
<?php | |
/* | |
* (C) Copyright 2015 76design Inc (https://76design.com) and others. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
View SessionActions.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
var { Actions } = require('flummox'); | |
var Promise = require('bluebird'); | |
var assign = require('object-assign'); | |
class SessionActions extends Actions { | |
constructor(api, flux) { | |
super(); | |
this.api = api; | |
this.flux = flux; | |
} |
View build-jq.sh
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/sh | |
# Modified version of: https://github.com/svnpenn/a/blob/e06ea1e/scripts/install-jq.sh | |
# up to date Windows native jq | |
# autoconf need for autoreconf | |
# automake need for autoreconf > aclocal | |
# libtool need for autoreconf > libtool | |
# bison need for make | |
# flex need for make |
NewerOlder