react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| ############################## | |
| ## Kirby configuration | |
| ############################## | |
| location /kirby/ { | |
| include /etc/nginx/mime.types; | |
| index index.php; | |
| root /var/www/addons88/; | |
| if (!-e $request_filename){ |
| # block content | |
| location ~ ^/content/(.*).(txt|md|mdown)$ { | |
| rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect; | |
| } | |
| # block all files in the site folder from being accessed directly | |
| location ~ ^/site/(.*)$ { | |
| rewrite ^/site/(.*)$ /error redirect; | |
| } |
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| var Col = require('react-bootstrap/lib/Col') | |
| var PageHeader = require('react-bootstrap/lib/PageHeader') | |
| var React = require('react') | |
| var Row = require('react-bootstrap/lib/Row') | |
| var {connect} = require('react-redux') | |
| var {reduxForm} = require('redux-form') | |
| var DateInput = require('./DateInput') | |
| var FormField = require('./FormField') | |
| var LoadingButton = require('./LoadingButton') |
| Secure sessions are easy, but it's not very well documented, so I'm changing that. | |
| Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy: | |
| The desired configuration for using NginX as an SSL proxy is to offload SSL processing | |
| and to put a hardened web server in front of your Node.js application, like: | |
| [NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [CLIENT] | |
| To do this, here's what you need to do: |
| // go on you labels pages | |
| // eg https://github.com/cssnext/cssnext/labels | |
| // paste this script in your console | |
| // copy the output and now you can import it using https://github.com/popomore/github-labels ! | |
| var labels = []; | |
| [].slice.call(document.querySelectorAll(".label-link")) | |
| .forEach(function(element) { | |
| labels.push({ | |
| name: element.textContent.trim(), |
| // Brightness math based on: | |
| // http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx | |
| @function sqrt ($r) { | |
| $x0: 1; | |
| $x1: $x0; | |
| @for $i from 1 through 10 { | |
| $x1: $x0 - ($x0 * $x0 - abs($r)) / (2 * $x0); | |
| $x0: $x1; |