Skip to content

Instantly share code, notes, and snippets.

View mattbasile's full-sized avatar

Matt Basile mattbasile

View GitHub Profile
@mattbasile
mattbasile / keybase.md
Last active May 27, 2022 13:23
keybase

Keybase proof

I hereby claim:

  • I am mattbasile on github.
  • I am mattbasile (https://keybase.io/mattbasile) on keybase.
  • I have a public key ASBdpV5oYausmh8TtcyD6Fji9XXvITQaWBlo-EXSA3Flnwo

To claim this, I am signing this object:

@mattbasile
mattbasile / _custom.tailwind.config.js
Last active January 23, 2020 18:27
Configure Tailwind with React-Boilerplate
// Add this to your tailwind.config.js when you're ready to test if Tailwind is working
module.exports = {
theme: {
extend: {
colors: {
'yellow-font': '#F7E500',
},
},
},
variants: {},
@mattbasile
mattbasile / entrecloud_solution.js
Last active June 18, 2019 19:20
Coding challenge solution for Entrecloud App
const assert = require('assert')
const url = require('url')
const rp = require('request-promise')
describe('object operations', () => {
let data
before(async () => {
/**
* INSTRUCTIONS:
@mattbasile
mattbasile / grokking_algos.py
Last active July 24, 2019 18:10
Grokking Algos
# Binary Sort - Find the mid value, guess, determine is our items is greater or less, reassign middle
def binary_Search(list, item):
low = 0
high = len(list)-1
while low<=high:
mid = low+high:
guess = list[mid]
if guess == item:
return mid
if guess > item:
const db = require("../data/dbConfig.js");
const Kennels = require('./kennels-module.js');
const Dogs = require('./dogs-module.js');
const bcrypt = require('bcryptjs');
module.exports = {
findById,
findBy,
add,
remove,
const router = require("express").Router();
const Auth = require('../modules/auth-module.js')
const Admins = require('../modules/admin-module.js');
const Dogs = require('../modules/dogs-module.js');
const bcrypt = require('bcryptjs');
//Register
router.post('/register', (req, res) => {
const user = req.body
if(!user.username && !user.password ) {
@mattbasile
mattbasile / breeds-module.js
Last active May 7, 2019 13:01
Visitors API
const db = require("../data/dbConfig.js");
const Dogs = require('./dogs-module');
module.exports = {
find,
findBreeds
};
function find(){
return db("breeds")
@mattbasile
mattbasile / Admin_Seeds
Last active August 28, 2019 14:22
Seed Files - Doggo Land
//Admin seed file
const faker = require('faker');
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('admins').truncate()
.then(function () {
// Inserts seed entries
return knex('admins').insert([
{
"kennel_id": 1,
@mattbasile
mattbasile / Admins_table
Last active August 28, 2019 14:16
Tables for Doggo Land Site
exports.up = function(knex, Promise) {
return knex.schema.createTable('admins', function(tbl){
tbl.increments('id').primary();
tbl.integer('kennel_id').unsigned().notNullable().references('id').inTable('kennels');
tbl.string("username", 255).notNullable().unique();
tbl.string("password", 255).notNullable();
})
};
exports.down = function(knex, Promise) {
@mattbasile
mattbasile / LICENSE
Created November 26, 2018 14:17 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions: