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
const isOBject = obj => { | |
const type = typeof obj; | |
return type === "function" || (type === "object" && !!obj); | |
}; | |
const getRandomKey = () => { | |
return ( | |
[...Array(10)].map(_ => ((Math.random() * 36) | 0).toString(36)).join`` || | |
{} | |
); |
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 throttle(){ | |
const timer = 300 | |
} |
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 React from 'react' | |
import { View, ART } from 'react-native' | |
import Rect from './Rect' | |
const {Surface} = ART | |
function App(){ | |
return( | |
<View style={{backgroundColor: 'rgba(37, 72, 101, 1.0)'}}> | |
<Surface width={300} height={300}> | |
<Rect width={100} height={100} fill={'yellow'} stroke={'green'} x={10} y={20} bottomRightRadius={100} bottomLeftRadius={20} topRightRadius={10}/> |
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
// Perfect vertical+horizontal centering. | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
@include prefixer(box-align, center, webkit moz ms spec); | |
-ms-flex-align: center; | |
@include prefixer(align-items, center, webkit spec); |
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
<?php | |
/*--------------------------------------------------------------------*/ | |
add_filter('post_class', 'elephas_post_class_hook' ); | |
if( !function_exists( 'elephas_post_class_hook' ) ){ | |
function elephas_post_class_hook( $post_class ){ | |