Skip to content

Instantly share code, notes, and snippets.

View baumandm's full-sized avatar
🏠
Working from home

Dave Bauman baumandm

🏠
Working from home
View GitHub Profile

Tiny wrapper component for [React-linkify](https://github.com/tasti/react-linkify to stylistically fit with Chakra-UI.

npm install --save react-linkify
npm install --save-dev @types/react-linkify

Instead of using the `` component provided by React-linkify, import the custom wrapper provided below.

@baumandm
baumandm / Chakra-UI x React-datepicker.md
Last active March 4, 2023 20:56
Chakra-UI x React-datepicker

⚠️ I'd recommend using this fork by @igoro00 which has better theme support.


Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.

<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />

Keybase proof

I hereby claim:

  • I am baumandm on github.
  • I am baumandm (https://keybase.io/baumandm) on keybase.
  • I have a public key ASDrdeERxHMQ6obhKWFXl5wqTArn34vDO-rSqAFjWXBqOAo

To claim this, I am signing this object:

@baumandm
baumandm / site.conf
Created November 29, 2016 06:20
Koken / Ghost Nginx Subdomains
server {
listen 80 default_server;
server_name www.davebauman.io davebauman.io;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@baumandm
baumandm / cyclotron-javascript-datasource-merge.md
Last active June 27, 2016 14:59
Cyclotron: JavaScript Data Source to execute and merge two Data Sources together

Cyclotron: JavaScript Data Source to execute and merge two Data Sources together

This is a JavaScript Data Source which executes two other data sources, and merges their results together based on some key. Since Widgets can only use a single Data Source at once, this is the solution for combining Data Sources.

Note: both datasource0 and datasource1 need to have "preload": true and "deferred": true, so that .execute() can be called.

Processor:

p = function (promise) {
@baumandm
baumandm / mongo-to-elastic.js
Created June 10, 2016 16:01
Streaming from MongoDB to Elasticsearch
// Uses Mongoose to stream a large collection out of mongoDB and into Elasticsearch
// Using the Elasticsearch.js library and bulk mode..
// Bulk request size must be large enough to avoid request timeout errors (depends on the ES cluster specs)
var mongoose = require('mongoose');
// Mongo connection, schema all configured in mongo.js
var mongo = require('./mongo');
var elasticsearch = require('elasticsearch');
@baumandm
baumandm / GIF-Screencast-OSX.md
Last active November 3, 2023 07:18 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to Animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.

Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: