A Pen by Jesse Hattabaugh on CodePen.
This file contains 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 YOUR_API_KEY = '8994b8108f2a4e4eba0b512942670f2c'; | |
var L = require('leaflet'); | |
var auth = require('arkanciscan-planet-client/api/auth'); | |
auth.setKey(YOUR_API_KEY); | |
var mosaics = require('arkanciscan-planet-client/api/mosaics'); | |
mosaics.get('color_balance_mosaic').then(function (data) { | |
This file contains 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
/* Esplaination | |
**************************************************************************** | |
This include represents a pattern for handling fonts which I have settled on after a lot of time | |
struggling to get fonts to render consistently across browsers. The jist of it is this; I don't | |
use font-weight or font-style. Instead I use a different font-family for each variation of the | |
font (ie. font-family: "FiraSans-Regular"; font-family: "FiraSans-BoldItalic"). The reason I do | |
this is that browsers don't always use the appropriate @font-face even when you declare them | |
with font-weight and font-size. This method allows me to control EXACTLY which font file is used. | |
*/ |
This file contains 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
/* Config - set the right values in the PhoneGap config.xml | |
******************************************************************************/ | |
gulp.task('config', function () { | |
return gulp.src([srcDir + '/config.xml']) | |
.pipe(cheerio({ | |
run: function ($) { | |
// get the version number from package.json | |
$('widget').attr('version', require('./package').version); | |
// in development launch the app with a different html file |
This file contains 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
/* Images | |
******************************************************************************/ | |
gulp.task('images', function() { | |
// batch mode | |
watch({glob: './source/images/*'}) | |
.pipe(plumber()) | |
.pipe(imagemin({ | |
progressive: true, | |
interlaced: true |
This file contains 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
module.exports = function (chai, utils) { | |
var Assertion = chai.Assertion; | |
Assertion.addMethod('setsGets', function (val) { | |
var method = this._obj; | |
// setter/getters must be functions | |
new Assertion(method).to.be.a('function'); | |
This file contains 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
var gulp = require('gulp'); | |
gulp.task('default', ['stylus']); | |
/* Stylus | |
-------------------------------------*/ | |
var stylus = require('gulp-stylus'); | |
var nib = require('nib'); | |
gulp.task('stylus', function() { | |
return gulp.src('source/*.styl') |
This file contains 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
#!/usr/bin/env node | |
"use strict"; | |
var fs = require('fs'), | |
gw = require('globwatcher').globwatcher; | |
var cssw = gw('./source/*.styl', {persistent: true}); | |
cssw.on('added', function (filename) { |
This file contains 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
ul{ | |
width: 300px; | |
margin: 100px auto; | |
} | |
li{ | |
font-size: 1em; | |
list-style: none; | |
background-image: url('http://icons.iconarchive.com/icons/calle/smith-and-wesson/32/Single-Bullet-icon.png'); | |
background-repeat: no-repeat; |
This file contains 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
<html><body> | |
<h1>Find a Unique Username</h1> | |
<p>With a limit of 15 characters</p> | |
<form method="get"> | |
<label>First Name <input name="first_name" /></label> | |
<label>Last Name <input name="last_name" /></label> | |
<label>Quit after <input name="end" value="111" /></label> |