Skip to content

Instantly share code, notes, and snippets.

🚩
Working on new projects

David Dias thedaviddias

🚩
Working on new projects
Block or report user

Report or block thedaviddias

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thedaviddias
thedaviddias / sample.js
Created Feb 19, 2019 — forked from tushuhei/sample.js
Getting Website Title with Headless Chrome
View sample.js
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('lighthouse/chrome-launcher/chrome-launcher');
function onPageLoad(Runtime) {
const js = "document.querySelector('title').textContent";
return Runtime.evaluate({expression: js}).then(result => {
console.log('Title of page: ' + result.result.value);
});
}
@thedaviddias
thedaviddias / repo-reset.md
Created Jul 20, 2018 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands
View repo-reset.md

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@thedaviddias
thedaviddias / README-Template.md
Created Nov 18, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@thedaviddias
thedaviddias / index.html
Created Nov 14, 2017
[Front-End Checklist] - Preloading
View index.html
<link rel="preload" href="app.js">
@thedaviddias
thedaviddias / index.html
Created Nov 14, 2017
[Front-End Checklist] - Prefetching
View index.html
<link rel="prefetch" href="image.png">
@thedaviddias
thedaviddias / index.html
Created Nov 14, 2017
[Front-End Checklist] - Preconnect
View index.html
<link rel="preconnect" href="https://example.com">
@thedaviddias
thedaviddias / index.html
Last active Nov 14, 2017
[Front-End Checklist] - DNS Prefetch
View index.html
<link rel="dns-prefetch" href="https://example.com">
@thedaviddias
thedaviddias / index.html
Last active Dec 11, 2017
[Front-End Checklist] - Canonical
View index.html
<!-- Helps prevent duplicate content issues -->
<link rel="canonical" href="http://example.com/2017/09/a-new-article-to-read.html">
@thedaviddias
thedaviddias / index.html
Created Nov 6, 2017
[Front-End Checklist] - Windows Tiles
View index.html
<!-- Microsoft Tiles -->
<meta name="msapplication-config" content="browserconfig.xml">
@thedaviddias
thedaviddias / index.html
Last active Dec 11, 2017
[Front-End Checklist] - Apple Touch Icon
View index.html
<!-- Apple Touch Icon (at least 200x200px) -->
<link rel="apple-touch-icon" href="/custom-icon.png">
<!-- To run web application in full-screen -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Status Bar Style (see Supported Meta Tags below for available values) -->
<!-- Has no effect unless you have the previous meta tag -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
You can’t perform that action at this time.