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
{ | |
"names": [ | |
"google", | |
"youtube", | |
"twitter" | |
], | |
"size": 24, | |
"padding": 4, | |
"radius": 4, | |
"foreground": "#333", |
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
# no need to ignore entire "config" directory | |
secrets.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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Welcome to Firebase Hosting</title> | |
<!-- update the version number as needed --> | |
<script defer src="/__/firebase/4.2.0/firebase-app.js"></script> |
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
// progressive enhancement, use it only when it is available | |
if ('share' in navigator) { | |
// the object argument to navigator.share() should have at least | |
// one of the following keys: title, text, url | |
navigator.share({ | |
title: 'The Web Share API', | |
text: 'The text that I want to share', | |
url: 'https://blog.arnellebalane.com/the-web-share-api' | |
}) |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Geolocation API</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBdhHU9eaIJBJfoKj2fnpGRIJdcGBz07Qg&callback=displayMap" defer async></script> |
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
// make sure that the remote branch is | |
// available in the local repository | |
git fetch | |
// all of these create branch "develop" | |
// to track remote branch "origin/develop" | |
git branch develop origin/develop | |
git checkout -b develop origin/develop | |
git checkout --track origin/develop |
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
// only files that are added through a file input field can be read | |
var input = document.querySelector('input[type="file"]'); | |
// can also handle multiple files, but i'll just use one here | |
var file = input.files[0]; | |
var reader = new FileReader(); | |
reader.onload = function(e) { | |
var data = e.target.result; | |
// do anything with data, which is the file that has been read |