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
//Set Variables | |
$button-white: #ffffff; | |
$button-green: #44ca00; | |
$button-green-dark: #369a12; | |
$button-blue: #a6d1f9; | |
$button-blue-dark: #14283e; | |
$button-gray: #eeeeee; | |
$button-red: #9e0b0f; | |
//Create Array |
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
class ClassFactory | |
{ | |
function __construct($namespace = '') | |
{ | |
$this->namespace = $namespace; | |
} | |
public function make($source) | |
{ | |
$name = $this->namespace . '\\' . $source; |
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 validation from 'validate.js' | |
export default function validate(fieldName, value) { | |
var constraints = { | |
email: { | |
presence: true, | |
format: { | |
pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, | |
message: 'Invalid email id', | |
} |
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 from "react-native"; | |
import Dimensions from 'Dimensions'; | |
// Precalculate Device Dimensions for better performance | |
const x = Dimensions.get('window').width; | |
const y = Dimensions.get('window').height; | |
// Calculating ratio from iPhone breakpoints | |
const ratioX = x < 375 ? (x < 320 ? 0.75 : 0.875) : 1 ; | |
const ratioY = y < 568 ? (y < 480 ? 0.75 : 0.875) : 1 ; |
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
//Set Variables | |
$button-white: #ffffff; | |
$button-green: #44ca00; | |
$button-green-dark: #369a12; | |
$button-blue: #a6d1f9; | |
$button-blue-dark: #14283e; | |
$button-gray: #eeeeee; | |
$button-red: #9e0b0f; | |
//Create Array |
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 | |
$apnsHost = 'gateway.sandbox.push.apple.com'; | |
$apnsCert = 'apns-dev.pem'; | |
$apnsPort = 2195; | |
$streamContext = stream_context_create(); | |
stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); | |
$apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext); |
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 removeEmoji($text) | |
{ | |
$cleanText = ""; | |
// Match Emoticons | |
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; | |
$cleanText = preg_replace($regexEmoticons, '', $text); | |
// Match Miscellaneous Symbols and Pictographs | |
$regexSymbols = '/[\x{1F300}-\x{1F5FF}]/u'; |
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 } from 'react' | |
import { Redirect } from 'react-router' | |
export default class ContactForm extends Component { | |
constructor () { | |
super(); | |
this.state = { | |
fireRedirect: false | |
} | |
} |
OlderNewer