Skip to content

Instantly share code, notes, and snippets.

View harrisrobin's full-sized avatar
🛳️
Shipping

harris.dev harrisrobin

🛳️
Shipping
View GitHub Profile
import axios from 'axios';
// import _ from 'lodash';
// ------------------------------------
// Constants
// ------------------------------------
export const GET_INDUSTRIES_SUCCESS = 'GET_INDUSTRIES_SUCCESS';
export const SELECT_INDUSTRY_SUCCESS = 'SELECT_INDUSTRY_SUCCESS';
// ------------------------------------
// center vertically and/or horizontally an absolute positioned element
//
@mixin center($xy:xy) {
@if $xy == xy {
left: 50%;
top: 50%;
bottom: auto;
right: auto;
@include transform(translateX(-50%) translateY(-50%));
}
// breakpoints
$S: 480px;
$M: 768px;
$L: 1100px;
$L: 1100px;
$XL: 1440px;
// media queries
@mixin MQ($canvas) {
@if $canvas == S {
@harrisrobin
harrisrobin / Company-Model.js
Last active October 21, 2018 10:59
feathers-sequelize many-to-many association
'use strict';
// company-model.js - A sequelize model
//
// See http://docs.sequelizejs.com/en/latest/docs/models-definition/
// for more of what you can do here.
const Sequelize = require('sequelize');
module.exports = function(sequelize) {
// Write a program that prints out the numbers 1 to 100 (inclusive). If the number is divisible by 3, print Crackle instead of the number. If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop. You can use any language.
function cracklePop() {
for (var i = 0; i <= 100; i++) {
if ((i % 5 === 0) && (i % 3 === 0)) {
console.log('CracklePop')
} else if (i % 3 === 0) {
console.log('Crackle')
} else if (i % 5 === 0) {
console.log('Pop')
'use strict'
require('dotenv').config({ silent: true })
const path = require('path')
const serveStatic = require('feathers').static
const favicon = require('serve-favicon')
const compress = require('compression')
const cors = require('cors')
const feathers = require('feathers')
const configuration = require('feathers-configuration')
@harrisrobin
harrisrobin / jb-db.md
Created February 9, 2017 19:45
Jobbook Database Changes

Jobbook DB notes

#clients/jobbook/notes

users table

ADD

- fullName (STRING)
- firstNameInitial (STRING)
- location  (GEOMETRY POINT)
- address (JSON)
@harrisrobin
harrisrobin / prismic-backup-example.js
Created March 1, 2017 01:13
an example of a backup of content on Prismic.io
├───blog-post
│ UlfoxUnM0wkXYXbi.json
│ UlfoxUnM0wkXYXbl.json
│ UlfoxUnM0wkXYXbm.json
│ UlfoxUnM0wkXYXbt.json
│ UlfoxUnM0wkXYXbu.json
│ UlfoxUnM0wkXYXbX.json
├───product
│ UlfoxUnM0wkXYXbD.json
[
{
"title": "How to handle state in React. The missing FAQ.",
"author": "Osmel Mora",
"url": "https://medium.com/react-ecosystem/how-to-handle-state-in-react-6f2d3cd73a0c"
},
{
"title": "You might not need React Router",
"author": "Konstantin Tarkus",
"url": "https://medium.freecodecamp.com/you-might-not-need-react-router-38673620f3d"