function createRoutes() {
function requireLogin(store) {
return (nextState, replaceState) => {
const { users: { user }} = store.getState();
if (_.isEmpty(user)) { // or any other authentication condition
replaceState({ nextPathname: nextState.location.pathname }, '/');
This file contains hidden or 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
| set runtimepath^=~/.vim runtimepath+=~/.vim/after | |
| let &packpath = &runtimepath | |
| source ~/.vimrc | |
| """ | |
| """ EXPERIMENTAL | |
| """ tagbar | |
| """ tern_for_vim | |
| """ vim-obsession | |
| """ ctrlp.vim | |
| """ |
This file contains hidden or 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
| nnoremap <leader>fa :execute ":! yarn --silent flow type-at-pos --quiet %" line(".") col(".") "\| grep '^type' \| yarn --silent prettier --stdin-filepath test.js"<cr> |
This file contains hidden or 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
| version: '2' | |
| services: | |
| grafana: | |
| image: grafana/grafana:5.0.0 # or probably any other version | |
| container_name: grafana | |
| restart: always | |
| environment: | |
| - VIRTUAL_HOST=YOUR.DOMAIN.TEST # adjust to match your domain name | |
| - VIRTUAL_PROTO=https |
This file contains hidden or 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
| " RELOAD WITHOUT closing vim | |
| " :so ~/.vimrc | |
| " | |
| set nocompatible | |
| """"""""""""""""""" | |
| " PLUGINS | |
| """"""""""""""""""" | |
| " Specify a directory for plugins | |
| " - For Neovim: ~/.local/share/nvim/plugged |
This file contains hidden or 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
| # Load DSL and set up stages | |
| require 'capistrano/setup' | |
| # Include default deployment tasks | |
| require 'capistrano/deploy' | |
| # Include tasks from other gems included in your Gemfile | |
| require 'capistrano/rvm' | |
| require 'capistrano/bundler' | |
| require 'capistrano/rails/assets' |
Full live (client side) validation, "developed" to use with simple_form and foundation markup (should work in other cases too).
Create separate .coffee file e.g. client_side_select2.js.coffee with following code:
# Add select2 support
ClientSideValidations.selectors.validate_inputs += ', select[data-select2-validate]'
ClientSideValidations.selectors.inputs += ', .select2-container'
This file contains hidden or 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 ruby | |
| # Modified from : http://www.tkalin.com/blog_posts/using-console-vim-as-vim-protocol-handler-in-ubuntu | |
| # NOTE: This opens with a link to the mvim protocol for compatibility with RailsPanel | |
| # goes to /usr/local/bin/cvim | |
| require 'uri' | |
| require 'cgi' | |
| full_path = ARGV[0] |