Skip to content

Instantly share code, notes, and snippets.

View heaversm's full-sized avatar

Mike Heavers heaversm

View GitHub Profile
@heaversm
heaversm / opencv-contrib-whitebalance.cpp
Created March 20, 2019 00:29
Using OpenCV Contrib White Balancing on a Mat in C++
//install openCV contrib: https://cocoapods.org/pods/OpenCV2-contrib
/*
//in Podfile:
target 'MyProject' do
pod 'OpenCV2-contrib', '~> 3.2'
*/
//pod install
#include <opencv2/core/core.hpp>
@heaversm
heaversm / ideo_design_thinking_process.md
Last active July 7, 2019 21:21
Ideo Design Thinking Process

DESIGN THINKING

PHASES:

Inspiration

Frame the design challenge.

@heaversm
heaversm / contentful-query-examples.js
Created July 25, 2019 18:54
Examples of different ways to query contentful
let contentfulClient = contentful.createClient({
space: '[space_id]',
accessToken: '[access_token]'
});
//GET ALL ENTRIES
contentfulClient.getEntries().then(entries => {
console.log(entries); //gets everything
entries.items.forEach(entry => {
@heaversm
heaversm / regex.js
Created August 5, 2019 15:54
useful regexes
//find all instances of [thing1] NOT followed by [thing2]:
^(?!.*thing2).*thing1
@heaversm
heaversm / mac-management.js
Created August 5, 2019 16:10
Mac Management
//DELETE SAVED UNDO HISTORY FOR PROGRAMS
/.DocumentRevisions-V100/
@heaversm
heaversm / runway-model-info.js
Created August 14, 2019 19:48
Get Runway Model Info as JSON
let modelOutput;
fetch('http://localhost:8000/info')
.then(response => response.json())
.then(output => {
modelOutput = output;
// use the output in your project
console.log(output);
//to copy it from the console, right click the object in chrome and choose 'save as global variable'
//then type copy(temp1) and paste the clipboard contents into a .json file
@heaversm
heaversm / eslint-commands.js
Created October 16, 2019 16:52
ESLint helpful notes and commands
//disables the current line:
// eslint-disable-line
//at top of file, disables linting on the entire file:
/* eslint-disable */
@heaversm
heaversm / git-commands.sh
Created October 16, 2019 17:36
Useful git commands
#verify remotes
git remote -v
#edit git config
git config -e
@heaversm
heaversm / common-js-workflows.md
Last active October 16, 2019 19:49
Common JS Workflows

COMMON JS WORKFLOWS

Use an ES6 Module

With Unpkg

Add type="module" to script tags:

<script type="module">
  //then make sure to use the param module in unpkg:
@heaversm
heaversm / react_native_bar_carousel.js
Created May 5, 2017 05:06
React Native Custom Carousel