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
// Country model: | |
// [ | |
// Country name, | |
// Regions, | |
// iso2 code, | |
// International dial code, | |
// Format (if available), | |
// Order (if >1 country with same dial code), | |
// Area codes (if >1 country with same dial code) | |
// ] |
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(e) { | |
function n() { | |
if (void 0 === e.isLoadedScriptCpVar || 1 != e.isLoadedScriptCpVar) { | |
var n = {}; | |
n.startLoadFrame = (new Date).getTime(); | |
var t = g(); | |
if (null !== t && void 0 !== t) { | |
var o = t.src, | |
i = h(o, "quick_start"); | |
0 != i && (n.quick_start = 1, e.isLoadedScriptCpVar = 1, a(n)) |
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
FROM python:3.4 | |
ENV PIP_REQUIRE_VIRTUALENV false | |
RUN mkdir -p /cms/requirements/ | |
ADD requirements/base.txt /cms/requirements/base.txt | |
RUN pip install -r /cms/requirements/base.txt | |
EXPOSE 8090 | |
WORKDIR /cms/src | |
CMD python manage.py runserver --settings=config.settings.docker 0.0.0.0:8090 |
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
.PHONY: init | |
current_dir = $(shell pwd) | |
init: | |
docker build . -f python.dockerfile -t cms-python | |
docker run --name cms-mysql -e MYSQL_ROOT_PASSWORD=secretpassword -d mysql/mysql-server:5.7 | |
docker exec cms-mysql bash -c "mysql -u'root' -p'secretpassword' -e 'CREATE DATABASE cms'" || : | |
docker run --name cms-web --link cms-mysql:mysql -v "${current_dir}/src:/cms/src/" -p 0.0.0.0:8090:8090 -d cms-python | |
docker exec cms-web bash -c "python manage.py migrate --settings=config.settings.docker" | |
docker exec -it cms-web bash -c "python manage.py createsuperuser --settings=config.settings.docker" |
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
DATABASES = { | |
'default': { | |
'HOST': 'mysql', | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'cms', | |
'USER': 'root', | |
'PASSWORD': 'secretpassword', | |
}, | |
} |
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
.PHONY: init clean start stop | |
current_dir = $(shell pwd) | |
init: | |
docker build . -f python.dockerfile -t cms-python | |
docker run --name cms-mysql -e MYSQL_ROOT_PASSWORD=secretpassword -d mysql/mysql-server:5.7 | |
docker exec cms-mysql bash -c "mysql -u'root' -p'secretpassword' -e 'CREATE DATABASE juno_cms'" || : | |
docker run --name cms-web --link cms-mysql:mysql -v "${current_dir}/src:/cms/src/" -p 0.0.0.0:8090:8090 -d cms-python | |
docker exec cms-web bash -c "python manage.py migrate --settings=config.settings.docker" | |
docker exec -it cms-web bash -c "python manage.py createsuperuser --settings=config.settings.docker" |
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 asyncAction = (target, action, descriptor) => { | |
// Define async handler action names | |
let actionBegin = action + 'Begin'; | |
let actionEnd = action + 'End'; | |
let actionFailure = action + 'Failure'; | |
// Action should explicitly call dispatch | |
let actionFunc = x => dispatch => dispatch(x); | |
// Async handlers methods |
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
/* Base hack */ | |
@media only screen { | |
#app:after { | |
content: 'small'; | |
} | |
} | |
@media only screen and (min-width: 30.063em) { | |
#app:after { |
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
// I've got a strange behaviour of my very first app run | |
Object {type: "@@redux/INIT"} | |
index.js:22 Object {type: "@@redux/PROBE_UNKNOWN_ACTION_8.s.t.3.h.j.x.x.b.t.9"} | |
index.js:22 Object {type: "@@redux/INIT"} | |
index.js:22 Object {type: "@@reduxReactRouter/routerDidChange", payload: Object} | |
configureStore.js:27 Object {pathname: "/", search: "", hash: "", state: null, action: "POP"…} | |
configureStore.js:27 Object {pathname: "/", search: "", hash: "", state: null, action: "REPLACE"…} | |
index.js:22 Object {type: "@@reduxReactRouter/replaceRoutes", payload: Object} | |
index.js:22 Object {type: "@@reduxReactRouter/routerDidChange", payload: Object} |
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 fs = require('fs'), | |
path = require('path'), | |
postcss = require('postcss'), | |
valueParser = require('postcss-value-parser'); | |
module.exports = postcss.plugin('postcss-image-preload', function (opts) { | |
opts = opts || {}; | |
if (!Object.keys(opts).length) |
NewerOlder