Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and php56-FPM | |
sudo yum install -y nginx php56-fpm | |
# Install php56 extensions | |
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap |
Datomic.q(Query( | |
s"""[:find ?name | |
:in $$ | |
:where [_ :db/ident ?ident] | |
[(namespace ?ident) ?ns] | |
[(name ?ident) ?name] | |
[(= ?ns "namespace_name")] | |
]""" | |
), database).foreach { | |
case name: String => println(name) |
OldHttpRequest = Turbolinks.HttpRequest | |
class Turbolinks.CachedHttpRequest extends Turbolinks.HttpRequest | |
constructor: (_, location, referrer) -> | |
super(this, location, referrer) | |
requestCompletedWithResponse: (response, redirectedToLocation) -> | |
@response = response | |
@redirect = redirectedToLocation | |
package ws.eiennohito.utils.serialization | |
import java.lang.reflect.Modifier | |
import java.util.concurrent.ConcurrentHashMap | |
import akka.serialization.Serializer | |
import com.google.protobuf.CodedOutputStream | |
import com.trueaccord.scalapb.{GeneratedMessage, GeneratedMessageCompanion} | |
import com.typesafe.scalalogging.StrictLogging |
#!/bin/sh | |
# this script requires root | |
# be sure to run the following before running this: | |
# $ sudo su | |
# since there's an issue piping the curl response to bash | |
# just download the install script | |
curl -sL https://deb.nodesource.com/setup_6.x > install_node.sh |
module.exports = { | |
webpack: (config) => { | |
const webpack = require('webpack') | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
config.plugins = config.plugins || [] | |
config.plugins.push(new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/)) | |
config.plugins.push(new BundleAnalyzerPlugin()) | |
return config | |
} | |
} |
/** | |
* Making promises | |
*/ | |
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok")); | |
/* Simpler promise creation for static values */ | |
Js.Promise.resolve("easy"); | |
Js.Promise.reject(Invalid_argument("too easy")); |
{ | |
"name": "this-web-scale", | |
"version": "0.0.1", | |
"scripts": { | |
"dev": "node server.js", | |
"build": "NODE_ENV=production next build", | |
"start": "NODE_ENV=production node server.js", | |
"dockerize": "npm run build:docker && npm run tag:docker && npm run push:docker && npm run tag-latest:docker && npm run push-latest:docker", | |
"deploy": "eb use this-web-scale-production && eb deploy --label v$npm_package_version --verbose", | |
"build:docker": "docker build -t $npm_package_config_docker_image:$npm_package_version -t $npm_package_config_docker_image:latest .", |
import javax.inject.{Inject, Singleton} | |
import akka.stream.Materializer | |
import play.api.Configuration | |
import play.filters.cors.CORSConfig.Origins.Matching | |
import play.filters.cors.{CORSConfig, CORSFilter} | |
import scala.concurrent.ExecutionContext | |
import scala.util.matching.Regex |
Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.