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
let htmlCollection = document.getElementsByClassName("row-title"); | |
let rowTitle = Array.from(htmlCollection); | |
rowTitle.map((t) => {t.setAttribute("onclick", "window.open(this.href);")}) | |
function eventFire(el, etype){ | |
if (el.fireEvent) { | |
el.fireEvent('on' + etype); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, 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
import styled from 'styled-components'; | |
export const theme = { | |
colors: { | |
primaryColor: 'green', | |
secondaryColor: 'black', | |
}, | |
device: { | |
"phone": '@media(min-width: 400px)', | |
'phoneWide': '@media(min-width: 480px)', |
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 | |
// Somewhere off in your wp-config.php make sure you replace 123456 with your api key. | |
define( 'NETLIFY_API_KEY', '123456' ); | |
// Somewhere off in your theme or even a plugin. | |
/** | |
* Netlify Webhook Build Function | |
* |
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
check_redirects() { | |
while IFS=, read -r req dest; | |
do | |
test="$req => $dest" | |
echo "Now testing $test" | |
if curl -Is "$1"$req | grep -s $dest; then | |
result=Pass | |
else | |
result=Fail | |
fi |
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 * as React from 'react' | |
import MapView from 'react-native-maps' | |
import * as Location from 'expo-location' | |
import * as Permissions from 'expo-permissions' | |
import { StyleSheet } from 'react-native' | |
import { Text } from 'react-native-paper' | |
const { useState, useEffect } = React | |
export default function MapScreen() { |
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 firebase from 'firebase/app'; | |
import 'firebase/auth'; | |
import 'firebase/firestore'; | |
import 'firebase/storage'; | |
const firebaseConfig = { | |
apiKey: "YOUR_APP_KEY", | |
authDomain: "YOUR_AUTH_DOMAIN.firebaseapp.com", | |
projectId: "YOUR_PROJECT_ID", | |
storageBucket: "YOUR_STORAGE_BUCKET.appspot.com", |
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
/** | |
* Sign In | |
* | |
* @returns {Promise} with user object. | |
**/ | |
export default function signInWithEmailAndPassword( email, password ) { | |
if ( ! email || ! password ) { | |
alert( `Enter your ${ ! email ? 'email' : 'password' } and try again.` ); | |
return; | |
} |