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
/** | |
* Helper to check for: | |
* Component vs Element | |
* Class vs Functional | |
* Component DOM vs Composite Element | |
*/ | |
import React from 'react'; | |
export function isClassComponent(component) { |
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
import React, { Component, PropTypes } from 'react'; | |
import { View, Image, TextInput, Text, Dimensions, Alert } from 'react-native'; | |
import { Font } from 'expo'; | |
import { connect } from 'react-redux'; | |
import { LoginButton } from '../SubComponents/LoginComponent/LoginButton'; | |
import { loginUser } from '../../actions' | |
class Login extends Component { | |
static propTypes = { | |
loginUser: PropTypes.func, |
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
import React, { PureComponent } from 'react'; | |
import { Container, Header, Grid, Image} from 'semantic-ui-react'; | |
import './HomeSlice.scss'; | |
export class HomeSlice extends PureComponent { | |
render() { | |
const {heading, image, context, reverse} = this.props; | |
const imageTag = <Image size="large" className="homeSlice--image" src={image}/>; | |
const text = context.split('<br />').map((item, key) => { | |
return <span key={key}>{item.trim()}<br/></span>; |
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
import axios from 'axios'; | |
import { | |
ADD_EMAIL_STARTED, | |
ADD_EMAIL_FINISHED | |
} from '../types'; | |
/** | |
* Do not use hasError callback if you are using | |
* componentWillReceiveProps in component. |
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 CleanObsoleteChunks = require('webpack-clean-obsolete-chunks'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const DashboardPlugin = require('webpack-dashboard/plugin'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const BUILD_DIR = path.resolve(__dirname, '../dist'); | |
const APP_DIR = path.resolve(__dirname, 'src/'); |
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"sourceType": "module", | |
"ecmaVersion": 8, |
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
<?php | |
$di->set('deferred.classes', $deferred = [ | |
'mail.selected_adapter' => Closure, | |
'mail' => Closure, | |
'db' => Closure, | |
'log' => Closure, | |
]); | |
function resolve($alias) |
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
// Test data. | |
var userData = { | |
"password": "$2a$12$cZnjMBhqUI97xlKyizJh9uf43Kz5h0RC5wXVfy9WhTuth.mCbfzl.", | |
"password_history": [ | |
{ | |
"created": "2017-05-01T23:00:00.000Z", | |
"password": "password" | |
}, | |
{ | |
"created": "2017-04-25T23:00:00.000Z", |
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
<?php | |
/** | |
* QR Code + Logo Generator | |
* | |
* http://labs.nticompassinc.com | |
*/ | |
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com'; | |
$size = isset($_GET['size']) ? $_GET['size'] : '200x200'; | |
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE; |
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
<?php | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($_GET && $_GET['url']) { | |
$headers = getallheaders(); | |
$headers_str = []; | |
$url = $_GET['url']; | |
foreach ( $headers as $key => $value){ | |
if($key == 'Host') |
NewerOlder