This file contains hidden or 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
| <section class="slider"> | |
| <img src="andrew-and-artist.jpg" onerror='this.src="./andrew-and-artist.jpg"' /> | |
| <nav class="slider-nav"> | |
| <ul> | |
| <li class="arrow"> | |
| <a href="#"><i class="fa fa-long-arrow-left"></i></a> | |
| </li> | |
| <li class="arrow"> | |
| <a href="#"><i class="fa fa-long-arrow-right"></i></a> | |
| </li> |
This file contains hidden or 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() { | |
| "use strict"; | |
| var fs = require('fs'); | |
| var firebase = require("firebase"); | |
| var ref = new firebase("https://xyz.firebaseio.com/baptiste"); | |
| var request = require('request').defaults({ encoding: null }); | |
| // Grab all teacher data | |
| var obj = JSON.parse(fs.readFileSync('teachers-part1.json', 'utf8')); |
This file contains hidden or 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
| <!-- | |
| This code displays the dropdown for the options to sort from. | |
| Adapted from https://gist.github.com/carolineschnapp/11352987 | |
| It will be inserted on every collections page. Probably in a snippet called something like collection-sorting.liquid | |
| --> | |
| <div class="form-horizontal"> | |
| <label for="SortBy" class="uppercase">{{ 'collections.sorting.title' | t }} </label> | |
| <select name="SortBy" id="SortBy"> |
This file contains hidden or 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
| let getBillableHours = function(projectId) { | |
| function sumTimes(times) { | |
| let billableHours = 0; | |
| for(let time of times) { | |
| billableHours += parseFloat(time.hours); | |
| } | |
| return billableHours; |
This file contains hidden or 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 scrypt = require('scrypt-async'); | |
| const nacl = require('tweetnacl'); | |
| nacl.util = require('tweetnacl-util'); | |
| // utility functions | |
| // ----------------- | |
| function printStage(stage) { | |
| console.log(stage); | |
| console.log('-'.repeat(stage.length)); | |
| } |
This file contains hidden or 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 request = require('request'); | |
| const GOOGLE_API_KEY = 'your api key'; // from https://console.developers.google.com/apis/credentials | |
| const urlToShorten = 'http://www.thelongurltoshorten.com'; | |
| const shortenerUrl = `https://www.googleapis.com/urlshortener/v1/url?key=${GOOGLE_API_KEY}`; | |
| const options = { | |
| uri: shortenerUrl, | |
| json: { | |
| longUrl: urlToShorten |
This file contains hidden or 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
Show hidden characters
| { | |
| "extends": "airbnb", | |
| "plugins": [ | |
| "react" | |
| ], | |
| "rules": { | |
| "max-len": [2, 122], | |
| "comma-dangle": [0], | |
| "react/jsx-closing-bracket-location": [1, "tag-aligned"] | |
| }, |
This file contains hidden or 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"> | |
| <title>Touchscreen Test</title> | |
| <style> | |
| body { | |
| text-align: center; | |
| } |
This file contains hidden or 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
| <script> | |
| // makes the dropdown sticky on hover and removes it on scrolling | |
| jQuery(document).ready(function () { | |
| /* | |
| On hovering over the products button, when the mouse is moved away, | |
| then make the dropdown stick by resetting the attributes to do that | |
| per Avada setup. | |
| */ | |
| jQuery('.shop-main-menu').hover(null, function() { |