Skip to content

Instantly share code, notes, and snippets.

View sbrichardson's full-sized avatar
:octocat:
In coding land

Stephen Richardson sbrichardson

:octocat:
In coding land
View GitHub Profile
@sbrichardson
sbrichardson / opencv_blackfly.cpp
Created June 18, 2019 05:08 — forked from kevinhughes27/opencv_blackfly.cpp
A simple program showing how to capture from a Point Grey Research Camera and display the image using OpenCV
#include "FlyCapture2.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace FlyCapture2;
int main()
/*!
* Webflow: Front-end site library
* @license MIT
* Inline scripts may access the api using an async handler:
* var Webflow = Webflow || [];
* Webflow.push(readyFunction);
*/
! function(t) {
var e = {};
import React, { memo, useReducer, useCallback } from 'react';
import ReactDOM from 'react-dom';
function random(max) { return Math.round(Math.random() * 1000) % max; }
const A = ["pretty", "large", "big", "small", "tall", "short", "long", "handsome", "plain", "quaint", "clean",
"elegant", "easy", "angry", "crazy", "helpful", "mushy", "odd", "unsightly", "adorable", "important", "inexpensive",
"cheap", "expensive", "fancy"];
const C = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "brown", "white", "black", "orange"];
const N = ["table", "chair", "house", "bbq", "desk", "car", "pony", "cookie", "sandwich", "burger", "pizza", "mouse",
@carlosedp
carlosedp / main.yml
Created January 28, 2019 19:02
Ansible playbook to automate new Kubernetes SBC nodes
---
- name: Setup SBC
hosts: all
#become: true
#become_user: root
gather_facts: false
vars:
#New user to be created
new_user: newuser
@songouyang
songouyang / font.sh
Created August 18, 2018 12:52
iterm2安装 SF Mono 字体
cd /Applications/Utilities/Terminal.app/Contents/Resources/Fonts/
cp *.otf ~/Library/Fonts/
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active May 3, 2024 12:56
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@paulcpk
paulcpk / cleanTypenameFieldLink.ts
Last active June 19, 2018 04:12
This is a custom ApolloLink which we use to clean the "__typename" field to prevent sending it to the GraphQL server. omitDeep based on this gist: https://gist.github.com/Billy-/d94b65998501736bfe6521eadc1ab538
@mwickett
mwickett / formikApollo.js
Last active December 20, 2022 23:00
Formik + Apollo
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'
@macbookandrew
macbookandrew / findStyles.js
Last active March 30, 2024 15:24
List unique CSS properties for all DOM elements
/**
* List unique CSS properties for all DOM elements
* Initially created to list unique font stacks on a page
* @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer}
*
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file}
*
* @author AndrewRMinion Design (https://andrewrminion.com)
* @version 1.1
*
@fernandomora
fernandomora / fswatch-rsync
Created September 12, 2016 22:43
Watch folder with fswatch and sync it with rsync
#!/usr/bin/env bash
# check color support
colors=$(tput colors)
if (($colors >= 8)); then
red='\033[0;31m'
nocolor='\033[00m'
else
red=
nocolor=