Skip to content

Instantly share code, notes, and snippets.

Josiah Wiebe josiahwiebe

Block or report user

Report or block josiahwiebe

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
@josiahwiebe
josiahwiebe / provinces_array.json
Last active Nov 8, 2019
JSON arrays of USA states and Canadian provinces, separated by country, combined and sorted, and combined and separated
View provinces_array.json
[
"Alberta",
"British Columbia",
"Manitoba",
"New Brunswick",
"Newfoundland and Labrador",
"Northwest Territories",
"Nova Scotia",
"Nunavut",
"Ontario",
@josiahwiebe
josiahwiebe / api.js
Created Feb 9, 2018
Polka NextJS + API Example
View api.js
const polka = require('polka')
module.exports = polka()
.get('/', (req, res) => {
res.end('this is the api')
})
@josiahwiebe
josiahwiebe / api.js
Created Feb 9, 2018
Express NextJS + API Example
View api.js
const express = require('express')
const router = express.Router()
router.get('/', (req, res) => {
res.status(200).json({message: 'hello from api'})
})
module.exports = router
@josiahwiebe
josiahwiebe / all.txt
Last active Dec 15, 2017
LTV Travelers Clubs
View all.txt
Carolina LTV'ers
Great North East Travelers
Dixie Leisure Travelers
Southwest LTV Roadrunners
Leisurely Great Lakers
Heartland LTV'ers
Blue Ridge Leisures
Flamingles
Texoma Travelers
Midwest LTVers
@josiahwiebe
josiahwiebe / cors.js
Created Sep 29, 2016
CORS with ExpressJS
View cors.js
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*')
res.header('Access-Control-Allow-Methods', 'GET,OPTIONS')
res.header('Access-Control-Allow-Headers', 'content-Type, X-Requested-With')
next()
})
@josiahwiebe
josiahwiebe / cors.js
Created Sep 29, 2016
Cors with ExpressJS
View cors.js
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*')
res.header('Access-Control-Allow-Methods', 'GET,OPTIONS')
res.header('Access-Control-Allow-Headers', 'content-Type, X-Requested-With')
next()
})
@josiahwiebe
josiahwiebe / nz-2011.geojson
Created Dec 8, 2015
Photo locations from NZ trip in 2011
View nz-2011.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josiahwiebe
josiahwiebe / file.js
Created Nov 13, 2015
Make clicked nav item active while deactivating all others
View file.js
$(document).ready(function() {
$('nav ul li').click(function(e) { // when clicking on the first level li
$('nav ul li div').removeClass('menu-is-visible'); // first remove the visible class any child div
$(this).children('div').addClass('menu-is-visible'); // then add the visible class to the current child div
});
});
@josiahwiebe
josiahwiebe / Gulpfile.js
Created Jun 3, 2015
Gulpfile with Sass error notify
View Gulpfile.js
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch'),
notify = require('gulp-notify'),
browserSync = require('browser-sync').create()
sass = require('gulp-sass'),
neat = require('node-neat').includePaths;
var paths = {
scripts: ['_src/js/**/*.js', '!dist/js/**/*.js'],
View neat-1-6-0.scss
// Bourbon Neat 1.6.0 (HELPERS)
// MIT Licensed
// Copyright (c) 2012-2013 thoughtbot, inc.
// Checks if a number is even
@function is-even($int) {
@return $int % 2 == 0
}
// Checks if an element belongs to a list
You can’t perform that action at this time.