Skip to content

Instantly share code, notes, and snippets.

View SlicedSilver's full-sized avatar

Mark Silverwood SlicedSilver

View GitHub Profile
@jorgecasar
jorgecasar / push-manifest-to-firebase.js
Last active November 13, 2018 09:46
Include Server Push headers in firebase.json from push-manifest.json generated by Polymer Build
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
const util = require('util');
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
function throwError(err) {
throw err;
@joncardasis
joncardasis / Storing-Images-On-Github.md
Last active June 25, 2024 16:30
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets

@SlicedSilver
SlicedSilver / Polymer Application Loading Screen.md
Last active February 21, 2017 02:04
Polymer Application Loading Screen

This is a simple snippet for adding a loading screen to a Polymer application. It is useful if your Polymer application is rather large and some users may be on a very slow internet connection.

The basic idea is that a very simple (and small) loading screen page will be loaded by the browser. When the browser has fully loaded and displayed the loading page then it will start loading all the files required for the Polymer application.

For a further speed improvement: the loading.css, and polymerAppLoader.js files can be placed inline with the index.html thus reducing the amount of files to be loaded from the server.

filestoload.html is a seperate file so that the usual grunt/gulp build functions can still be applied as before. Shouldn't require re-writting your build scripts.

Any improvements/comments are encouraged.