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
<ul class="social-icons"> | |
<li class="social-icon social-icon__fb"> | |
<a href="" rel="external noopener" target="_blank"> | |
<svg height="100%" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | |
<g class="social-icon-graph social-icon-graph__fb" transform="translate(-200.000000, -160.000000)"> | |
<path d="M225.638355,208 L202.649232,208 C201.185673,208 200,206.813592 200,205.350603 L200,162.649211 C200,161.18585 201.185859,160 202.649232,160 L245.350955,160 C246.813955,160 248,161.18585 248,162.649211 L248,205.350603 C248,206.813778 246.813769,208 245.350955,208 L233.119305,208 L233.119305,189.411755 L239.358521,189.411755 L240.292755,182.167586 L233.119305,182.167586 L233.119305,177.542641 C233.119305,175.445287 233.701712,174.01601 236.70929,174.01601 L240.545311,174.014333 L240.545311,167.535091 C239.881886,167.446808 237.604784,167.24957 234.9555 |
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 | |
function get_full_url() { | |
$url = ( isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ) ? 'https' : 'http'; | |
$url .= '://' . $_SERVER['SERVER_NAME']; | |
$url .= in_array( $_SERVER['SERVER_PORT'], array( '80', '443' ) ) ? '' : ":" . $_SERVER['SERVER_PORT']; | |
$url .= substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1); | |
return $url; | |
} |
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() { | |
const forms = document.querySelectorAll('.js-contact-form'); | |
let statusElems = []; | |
let status = ""; | |
forms.forEach(function(form) { | |
if (!form) return; | |
form.addEventListener('submit', function(e) { | |
e.preventDefault(); | |
const xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'submit.php'); |
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
<div class="easy-slides"> | |
<div class="easy-slide active" style="background-image:url('https://source.unsplash.com/random/800x400');"></div> | |
<div class="easy-slide" style="background-image:url('https://source.unsplash.com/random/700x400');"></div> | |
<div class="easy-slide" style="background-image:url('https://source.unsplash.com/random/800x300');"></div> | |
<div class="easy-slide-text"> | |
Hello World! | |
</div> | |
</div> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Track Clicks</title> | |
</head> | |
<body> | |
<button class="btn-to-track">Click Me!</button> |
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 express = require('express') | |
const bodyParser = require('body-parser') | |
const cors = require('cors') | |
const app = express() | |
const nodemailer = require('nodemailer') | |
const port = 8000 | |
app.use(bodyParser.json()) |
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
// currently running on localhost:3000 | |
const xhr = new XMLHttpRequest() | |
const url = 'localhost:8000/' | |
xhr.open('GET', url) | |
xhr.onreadystatechange = function() { | |
console.log(xhr.responseText) // logs nothing | |
} | |
xhr.send() |
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
{ | |
"workbench.colorTheme": "One Dark Pro", | |
"workbench.colorCustomizations": { | |
"[One Dark Pro]": { | |
// dark 1 (darkest) | |
"input.background": "#1f252b", | |
"badge.background": "#1f252b", | |
"sideBar.background": "#1f252b", | |
"sideBarSectionHeader.background": "#1f252b", | |
"tab.inactiveBackground": "#1f252b", |
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 { ObservableInput, of, from } from 'rxjs'; | |
import { tap } from 'rxjs/operators'; | |
import { MemoizedFunction, MapCacheConstructor } from 'lodash'; | |
/** | |
* A copy of _.memoize, modified for async | |
* | |
* @see _.memoize | |
* | |
* @param func The function to have its output memoized. |
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' | |
import useEffectAsync from './useEffectAsync' | |
export default function Brownies() { | |
const [brownies, setBrownies] = useState('Loading') | |
useEffectAsync( | |
async didUnmount => { | |
const res = await fetch(`https://api.brownies.com`) | |
if (!didUnmount) setBrownies(res) |
OlderNewer