Trying to mimic Squarespace's current background effect where it follows the motion of your mouse
A Pen by Josh Black on CodePen.
| module Flashcards | |
| class Application | |
| def initialize | |
| @decks = [] | |
| end | |
| def << deck | |
| @decks << deck | |
| end |
| 'use strict'; | |
| module.exports = function (grunt) { | |
| // Load our grunt tasks | |
| grunt.loadNpmTasks('grunt-contrib-less'); | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| grunt.loadNpmTasks('grunt-notify'); | |
| grunt.initConfig({ | |
| watch: { |
Trying to mimic Squarespace's current background effect where it follows the motion of your mouse
A Pen by Josh Black on CodePen.
| var Crawler = require("crawler").Crawler, | |
| fs = require('graceful-fs'), | |
| courseDictionary = require('./courseDictionary.json'), | |
| buildingDictionary = require('./buildingDictionary.json'), | |
| i = 1, | |
| request = 0; | |
| var c = new Crawler({ | |
| "maxConnections": 1, // Set to one so we don't run into concurrency issues when it comes to | |
| // writing to our result files |
| <?php | |
| class DB { | |
| /** | |
| * The PDO object | |
| * | |
| * @var object | |
| */ | |
| private $pdo; |
| // Require our node module to read user input from STDIN and STDOUT | |
| var readline = require('readline'), | |
| rl = readline.createInterface(process.stdin, process.stdout), | |
| user = new User(); | |
| // Write our intro messages | |
| process.stdout.write("Welcome to the flashcard application!\n"); | |
| process.stdout.write("What would you like to do?\n"); | |
| // Setup the prompt style |
| // First thing that we will need to set up are our dependencies for the application. | |
| // Since we are using Node.js we need to utilize it's readline module to take in input | |
| // from STDIN as well as output to STDOUT. | |
| // 1. Import our dependencies | |
| var readline = require('readline'), | |
| rl = readline.createInterface(process.stdin, process.stdout); | |
| // In the above code I've required the readline module and created its interface that | |
| // allows us to read input from the command line as well as send output to the command line. |
| // Takes in two node lists, i.e: | |
| // var orig = document.getElementsByTagName('*'); -> original DOM Tree | |
| // var update = document.getElementsByTagName('*'); -> updated DOM Tree | |
| // diff(orig, update); -> should return the affected nodes (deleted or added) | |
| function diff(original, updated) { | |
| // Create arrays from our two node lists. | |
| var originalList = [].slice.call(original, 0), | |
| updatedList = [].slice.call(updated, 0), |
Source Article from Digital Ocean
pkgin updatepkgin install openssh-5.8.2nb5| var timeSyntaxRules = { | |
| 1: function (time) { | |
| // Check to see if first digit is not 1, then preface it with zero | |
| var pattern = /[2-9]/; | |
| if (time.match(pattern)) { | |
| return "0" + time; | |
| } |