Skip to content

Instantly share code, notes, and snippets.

View imlucas's full-sized avatar
⚒️

Lucas Hrabovsky imlucas

⚒️
  • CNN
  • Philadelphia, PA
View GitHub Profile
@imlucas
imlucas / COMPASS_VERSIONS.json
Last active March 5, 2020 20:35
What version of Compass is using what version of the node mongodb driver and electron? Generated using this script: https://gist.github.com/imlucas/10c6e8d3d9c772cce887a5c42e0588a9#file-generate-compass-version-matrix-sh
[
{
"1.21.0-dev": {
"mongodb": "3.5.4",
"electron": "6.1.7"
}
},
{
"1.20.5": {
"mongodb": "3.4.0",

Allowing really long collection names in MDB

I was trying to think of test cases for implications of allowing collection names to have a length filling the be 16Mb boundary on a meta document and ascii-art came to mind.

To make a new collection from an image:

npm i -g ascii-art; 
ascii-art image -B 32 -a solid ~/Desktop/IMG_0099.jpg > arlo.ascii; 
export ARLO_ASCII=`cat arlo.ascii`;
mongodb-js/compass
mongodb-js/compass-devtools
mongodb-js/app-migrations
mongodb-js/collection-model
mongodb-js/collection-sample
mongodb-js/compass-aggregations
mongodb-js/compass-app-stores
mongodb-js/compass-auth-kerberos
mongodb-js/compass-auth-ldap
mongodb-js/compass-auth-x509
const log = require ('ololog').configure ({
locate: false
});
const { green, yellow, red, cyan, magenta, lightGray, darkGray, inverse, bgLightCyan, underline, dim } = require ('ansicolor')
const stringify = require ('string.ify')
const arrayStrictEqual = require('strict-array-equals');
function diff(lhs, rhs, fields, comparator) {
return fields.reduce((diff, field) => {
@imlucas
imlucas / compass-peer-dep-warnings.txt
Created December 10, 2019 19:13
run `npm ls` in ~/compass
[1.20-releases] compass/ npm ls | grep hadron-compile-cache
npm ERR! peer dep missing: @mongodb-js/compass-crud@^6.2.4, required by @mongodb-js/compass-aggregations@5.0.3
npm ERR! peer dep missing: @mongodb-js/compass-crud@^6.2.3, required by @mongodb-js/compass-explain-plan@4.0.2
npm ERR! peer dep missing: @mongodb-js/compass-crud@^6.2.3, required by @mongodb-js/compass-schema-validation@3.1.0
npm ERR! peer dep missing: @mongodb-js/compass-deployment-awareness@^6.4.1, required by @mongodb-js/compass-databases-ddl@3.0.0
npm ERR! peer dep missing: @mongodb-js/compass-deployment-awareness@^6.4.1, required by @mongodb-js/compass-indexes@3.0.3
npm ERR! peer dep missing: @mongodb-js/compass-export-to-language@^4.1.0, required by @mongodb-js/compass-aggregations@5.0.3
npm ERR! peer dep missing: @mongodb-js/compass-field-store@^4.0.4, required by @mongodb-js/compass-aggregations@5.0.3
npm ERR! peer dep missing: @mongodb-js/compass-field-store@^5.0.0, required by @mongodb-js/compass-explain-plan@4.0.2
npm ERR! peer
npm i --save-dev webpack@^4.29.6 webpack-bundle-analyzer@^3.1.0 webpack-cli@^3.2.3\
webpack-dev-server@^3.2.1 webpack-merge@^4.2.1 webpack-node-externals@^1.7.2 \
webpack-sources@^1.3.0 html-webpack-plugin@^3.2.0 mocha-webpack@^2.0.0-beta.0 \
extract-text-webpack-plugin@^4.0.0-beta.0 @hot-loader/react-dom@^16.8.4;

Using .svg inline background images

My workaround others might find useful in the future for manually bundling .svg into a compass plugin.

  1. In Sketch: Right-click ➡️ Copy SVG
  2. Paste SVG code into https://yoksel.github.io/url-encoder/ for background-image CSS prop
  3. Copy that CSS into your less like so
.icon-export {
#! /usr/bin/env bash
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-1.18.0-beta.3-darwin-x64.dmg | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-1.18.0-beta.3-win32-x64.exe | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-1.18.0-beta.3-win32-x64.zip | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-1.18.0-beta.3-win32-x64.msi | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-beta_1.18.0~beta.3_amd64.deb | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-beta-1.18.0-beta.3.x86_64.rpm | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-community-1.18.0-beta.3-darwin-x64.dmg | head -n1
curl -Is https://downloads.mongodb.com/compass/beta/mongodb-compass-community-1.18.0-beta.3-win32-x64.exe | head -n1

Installing MySQL for testing on rhel 6.2 via Evergreen

wget http://repo.mysql.com/yum/mysql-5.7-community/el/6/x86_64/mysql57-community-release-el6-10.noarch.rpm;
rpm -Uvh mysql57-community-release-el6-10.noarch.rpm;
yum-config-manager --disable mysql80-community;
yum-config-manager --enable mysql57-community;
yum install mysql-community-server -y;
service mysqld start