Tips for using less
on the command line.
To navigate:
- f = for next page
- b = for previous page
To search:
- /<query>
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install postgresql@9.6 | |
brew unlink postgresql@9.6 | |
brew link postgresql |
Tips for using less
on the command line.
To navigate:
To search:
Rollup 0.48 introduces a few changes to the options
object, because the current options are confusingly different between the CLI and the options exported by your config file.
entry
is now input
sourceMap
and sourceMapFile
are now sourcemap
and sourcemapFile
(note casing)moduleName
is now name
useStrict
is now strict
The dest
and format
options are now grouped together as a single output: { file, format, ... }
object. output
can also be an array of { file, format, ... }
objects, in which case it behaves similarly to the current targets
. Other output options — exports
, paths
and so on — can be added to the output
object (though they will fall back to their top-level namesakes, if unspecified).
The following instructions describe a set of processes allowing you to run Django database migrations against a production database without having to bring the web service down.
Note that in the below instructions, migrations are all run manually at explicit points, and are not an automatic part of the deployment process.
# Kill rails server and guard | |
bin/spring stop | |
brew services stop mysql | |
brew uninstall mysql | |
brew install mysql@5.5 | |
brew link mysql@5.5 --force | |
brew services start mysql@5.5 | |
rbenv uninstall 2.3.3 | |
rbenv install 2.3.3 | |
gem install bundle |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
#/usr/bin/python3 | |
""" Demonstration of logging feature for a Flask App. """ | |
from logging.handlers import RotatingFileHandler | |
from flask import Flask, request, jsonify | |
from time import strftime | |
__author__ = "@ivanleoncz" | |
import logging |
from django.utils.functional import SimpleLazyObject | |
from django.contrib.auth.models import AnonymousUser | |
from rest_framework.request import Request | |
from rest_framework_jwt.authentication import JSONWebTokenAuthentication | |
def get_user_jwt(request): | |
""" | |
Replacement for django session auth get_user & auth.get_user for |
So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).
What WebPack allows us to do is "require" CSS files and use their class names:
import styles from "my_styles.css";
import React from "react";