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
| function render() { | |
| switch(this.state) { | |
| case LOGIN_STATE: | |
| return <Login/> | |
| case SUCCESS_STATE: | |
| return <Success/> | |
| default: | |
| return <Login /> | |
| } | |
| } |
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
| if (curr.type === 'validationError') { | |
| const fieldName = curr.payload.name; | |
| const error = curr.payload.error; | |
| return acc.map((key, field) => { | |
| if (key === fieldName && !field.getValue()) { | |
| return field.setError(error); | |
| } | |
| return field; |
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
| 'use strict'; | |
| export const fileDownloader = (res) => { | |
| var filename = ''; | |
| let contentDisposition = res.headers.get('Content-Disposition'); | |
| if (contentDisposition && contentDisposition.indexOf('attachment') !== -1) { | |
| let filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/; | |
| let matches = filenameRegex.exec(contentDisposition); |
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
| import Dispatcher from '@uikit/dispatcher'; | |
| const dispatcher = new Dispatcher(); | |
| // register callback | |
| const removeListener = dispatcher.register((message) => { | |
| console.log(message); | |
| }); | |
| // dispatch message |
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
| /*! | |
| * quantize.js Copyright 2008 Nick Rabinowitz. | |
| * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
| */ | |
| // fill out a couple protovis dependencies | |
| /*! | |
| * Block below copied from Protovis: http://mbostock.github.com/protovis/ | |
| * Copyright 2010 Stanford Visualization Group | |
| * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php |
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
| http { | |
| map $http_user_agent $limit_bots { | |
| default ''; | |
| ~*(google|bing|yandex|msnbot) $binary_remote_addr; | |
| } | |
| limit_req_zone $limit_bots zone=bots:10m rate=1r/m; | |
| server { |
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
| [mysqld] | |
| datadir=/var/lib/mysql | |
| socket=/var/lib/mysql/mysql.sock | |
| user=mysql | |
| # Disabling symbolic-links is recommended to prevent assorted security risks | |
| symbolic-links=0 | |
| character-set-server=utf8 | |
| collation_server=utf8_unicode_ci | |
| slow_query_log=1 | |
| slow_query_log_file=slow-queries.log |
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
| #!/bin/bash | |
| # | |
| # supervisord This scripts turns supervisord on | |
| # | |
| # Author: Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd) | |
| # | |
| # chkconfig: - 95 04 | |
| # | |
| # description: supervisor is a process control utility. It has a web based | |
| # xmlrpc interface as well as a few other nifty features. |