Skip to content

Instantly share code, notes, and snippets.

@solace
solace / CustomModalBody.js
Last active April 20, 2021 13:30
Use react-bootstrap-typeahead with react-bootstrap-table
import React from 'react';
import editor from 'react-bootstrap-table/lib/Editor';
// Copied wholesale from react-bootstrap-table, modified where noted
class CustomModalBody extends React.Component {
getFieldValue() {
const newRow = {};
this.props.columns.forEach((column, i) => {
let inputVal;
@solace
solace / MapComponent.jsx
Last active March 5, 2021 07:57
Updating map bounds using react-google-maps
/* Only the necessary information to address
* https://github.com/tomchentw/react-google-maps/issues/183#issuecomment-220705977
* has been included here.
*
* YMMV.
*/
import React from 'react';
// Need these to muck around with bounds
@solace
solace / extend-email-send.md
Last active November 20, 2020 06:58
Meteor: Extend default Email.send invocation

Use a non-SMTP mail method in Meteor

Requirements:

  • lodash (or underscore, you may need to change your _ functions to suit)
  • Meteor email package
Meteor.startup(function () {
 var sendEmail = _.bind(Email.send, Email);
@solace
solace / meteor-mantra-meld.js
Last active February 20, 2016 06:47
splendido:accounts-meld with mantra-sample-blog-app
/**
* Get `splendido:accounts-meld` working with the Mantra sample Blog App
*
* Create a file that looks something like this in your `/server`
*
* Caveat: No guarantees, negligible support, YMMV. If you have a better way, let me know.
*/
import {Meteor} from 'meteor/meteor';
import _ from 'lodash';
@solace
solace / keybase.md
Last active October 25, 2018 02:25
keybase.md

Keybase proof

I hereby claim:

  • I am solace on github.
  • I am solace (https://keybase.io/solace) on keybase.
  • I have a public key ASBFfPwLOZyVzGD49DMuAY9WrHnQsvPysM54dAvkYD2G1Qo

To claim this, I am signing this object: