Skip to content

Instantly share code, notes, and snippets.

@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:

@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 / 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 / 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 / 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 / sphp-changes
Created June 14, 2018 12:04
Update sphp to support PHP 5.5
# Update the support arrays to include 5.5.
brew_array=("5.5","5.6","7.0","7.1","7.2")
php_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2")
valet_support_php_version_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2")
# Search for the `brew link --force "$php_version"` line, and replace it with this.
if [[ $(echo "$php_version" | sed 's/^php@//' | sed 's/\.//') -lt 56 ]]
then
brew link --force --overwrite "$php_version"
else
@solace
solace / WordPress to Buffer (Single Channel)
Last active March 4, 2019 04:22
Wordpress to Social Media via IFTTT - Messages with Hashtags
type Dict = { [key: string]: number };
const hashtags: Dict = {};
Wordpress.anyNewPostWp.TagsAndCategories.split(',').map(
s => hashtags['#' + s.toLowerCase().replace(/[\s-]+/g, '')] = 1
);
Buffer.addToBuffer.setMessage(
Wordpress.anyNewPostWp.PostTitle + "\n" +
Object.keys(hashtags).join(' ') + "\n" +
@solace
solace / fontawesome4to5.js
Last active March 6, 2020 02:04 — forked from timint/fontawesome4to5.js
Migrate Fontawesome 4 to 5 using jQuery (For the CSS Webfont version)
/*
* Migrate Fontawesome 4 to Fontawesome 5
* @website https://www.litecart.net/
*/
(function($){
var icons = {
"fa-500px": "fab fa-500px",
"fa-address-book-o": "far fa-address-book",
"fa-address-card-o": "far fa-address-card",
@solace
solace / gist:0ea7c761ff448a0f3aa5c7a35a7de278
Created April 6, 2020 05:04
Import FileZilla Bookmarks to Cyberduck
# From https://trac.cyberduck.io/ticket/7317
#
# Should do it automatically, if it doesn't, check if ~/.config/filezilla/sitemanager.xml exists.
# If it doesn't, create the directory, and
cp ~/.filezilla/sitemanager.xml ~/.config/filezilla/sitemanager.xml
defaults delete ch.sudo.cyberduck bookmark.import.de.filezilla
# Relaunch Cyberduck
@solace
solace / edl2timeline.py
Last active April 5, 2022 08:25
Convert DaVinci Resolve marker edl to YouTube usable timeline
"""
Check out STEAM Powered (https://steampoweredshow.com/) where I have conversations
with women in STEAM to learn a bit about what they do and who they are.
https://www.steampoweredshow.com/learn-more
"""
from pprint import pprint
from collections import OrderedDict
import sys
import re