Instantly share code, notes, and snippets.

View faquery.html
<!DOCTYPE html>
<html>
<head>
<title>ConsolidateJS</title>
<style type="text/css">
.bg-purple {
background-color: rebeccapurple;
}
View consolidate.html
<!DOCTYPE html>
<html>
<head>
<title>ConsolidateJS</title>
</head>
<body>
<script type="text/javascript">
var data = [
{
"name": "Jeff",
View gulpfile.js
/**
* Settings
*/
var settings = {
scripts: true, // Turn on/off script tasks
polyfills: true, // Turn on/off polyfill tasks
styles: false, // Turn on/off style tasks
svgs: false, // Turn on/off SVG tasks
static: false, // Turn on/off static file copying
View robot-hands-without-jquery.js
// Old-school ES5 way
function toggle () {
for (var i = 0; i < element.length; i++) {
if (element[i].style.opacity === '0') {
element[i].style.opacity = '1';
} else {
element[i].style.opacity = '0';
}
}
}
View markdown-editor.html
<!DOCTYPE html>
<html>
<head>
<title>Marked Demo</title>
<style type="text/css">
body {
margin: 0 auto;
height: 100%;
font-family: 'Helvetica Neue', Arial, sans-serif;
color: #333;
View updateLocalStorage.js
var addToLocalStorageArray = function (name, value) {
// Get the existing data
var existing = localStorage.getItem(name);
// If no existing data, create an array
// Otherwise, convert the localStorage string to an array
existing = existing ? existing.split(',') : [];
// Add new data to localStorage Array
View 0. README.md

Code Challenge: Build a star-based rating system

This is part of a series in which you'll be building a star-based rating system using only vanilla JavaScript and some CSS.

View LICENSE.md

GNU GENERAL PUBLIC LICENSE

Copyright (c) Go Make Things, LLC

Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of this

View base-modal.js
// Listen for all clicks on the document
document.addEventListener('click', function (event) {
// event.target is the clicked element
// If the link has the data-modal selector, we'll use it to toggle our modal
// Make sure to include a polyfill for matches(): https://vanillajstoolkit.com/polyfills/matches/
if (event.target.matches('[data-modal]')) {
// We can embed the message directly in the modal link if you want using the data-modal attribute
// Your link would look like this:
View hugo-deploy.php
<?php
/**
* Automated deploy from GitHub
*
* https://developer.github.com/webhooks/
* Template from ServerPilot (https://serverpilot.io/community/articles/how-to-automatically-deploy-a-git-repo-from-bitbucket.html)
* Hash validation from Craig Blanchette (http://isometriks.com/verify-github-webhooks-with-php)
*/