Skip to content

Instantly share code, notes, and snippets.

@Grsmto
Grsmto / next.config.js
Created June 15, 2018 08:39
Next.js support for css-modules & normal css at the same time, same behaviour as CRA
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const cssLoaderConfig = require('@zeit/next-css/css-loader-config');
const commonsChunkConfig = (config, test = /\.css$/) => {
config.plugins = config.plugins.map(plugin => {
if (
plugin.constructor.name === 'CommonsChunkPlugin' &&
// disable filenameTemplate checks here because they never match
// (plugin.filenameTemplate === 'commons.js' ||
// plugin.filenameTemplate === 'main.js')
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing