~> brew install ffmpeg
~> brew install imagemagick
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
module.exports = { | |
devtool: 'cheap-module-source-map', // might want to change this `source-map` for prod builds | |
entry: './entry', | |
output: { | |
path: './build', | |
pathinfo: true, | |
filename: 'bundle.js', | |
}, | |
resolve: { | |
// These are the reasonable defaults supported by the Node ecosystem. |
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
#!/usr/bin/env python | |
import glob | |
import os | |
import sys | |
os.environ['PYFLAKES_NODOCTEST'] = '1' | |
# pep8.py uses sys.argv to find setup.cfg | |
sys.argv = [os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)] |
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
/* eslint-disable no-console */ | |
var fs = require('fs'); | |
var path = require('path'); | |
var BASE_PATH = path.normalize(path.join(__dirname, '../')); | |
var nodeModulesPath = path.join(BASE_PATH, 'node_modules'); | |
function createSymlink(srcPath, destPath) { | |
// if symlink exists delete it |
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 | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
<Responsive>
{(width, orientation) => {
if (width > 851) {
if (orientation === 'portait') {
return (
<div>Big and vertical</div>
);
}
return (
- Create a ramdisk using
make_neo4j_ramdisk
- Clone https://github.com/nigelsmall/neoram
- Repoint symlink in neoram to
/Volumes/neo4jramdisk/neoram
- Run
./neoram download
to download neo4j - Open
./opt/neo4j/conf/neo4j-server.properties
and changeorg.neo4j.server.webserver.port=7474
to something that won't conflict - Install the load2neo plugin
- Download the plugin and move the
.jar
files to./opt/neo4j/plugins
- Add
org.neo4j.server.thirdparty_jaxrs_classes=com.nigelsmall.load2neo=/load2neo
to./opt/neo4j/conf/neo4j-server.properties
- Download the plugin and move the
- Run
./neoram 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
SELECT CONCAT(table_schema, '.', TABLE_NAME), | |
CONCAT(ROUND(table_rows / 1000, 2), 'K') ROWS, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 ), 2), 'M') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 ), 2), 'M') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 ), 2), 'M') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC; |
Pass the urls you care about to your javascript:
return {
'urls': js_urls(
'foo', # 'foo' => r'^(?P<slug>[a-z0-9-]+)/'
'bar', # 'bar' => r'^bar/(?P<id>[0-9-]+)/'
),
}