Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Working from home

Carmelyne Thompson carmelyne

🏡
Working from home
View GitHub Profile
@carmelyne
carmelyne / MongoDB_macOS_Sierra.md
Created Jun 15, 2017 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew
View MongoDB_macOS_Sierra.md

##Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
View gist:28d58433bbb0ff9b2676
#############
# Colors #
#############
# Set prompt: " username@hostname/directory/tree $ " (with colors)
export PS1=" \[\e[32;1m\]\u\[\e[0m\]\[\e[32m\]@\h\[\e[36m\]\w \[\e[33m\]\$ \[\e[0m\]"
#########
# AlIAS #
#########
alias home='cd ~'
View gist:819941d30667d4aa3edf
# First:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
#go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@carmelyne
carmelyne / gist:d15d789bbb3b4f6e6bbf
Last active Aug 29, 2015
Social Media Artboard Preset for Sketch
View gist:d15d789bbb3b4f6e6bbf
Instructions:
1. CD into ~/Library/Containers/com.bohemiancoding.sketch3/Data/Library/Application\ Support/com.bohemiancoding.sketch3
2. Once in the directory, type open .
3. Open artboards.plist with your preferred text editior
4. Add the code below --just right below
<plist version="1.0">
<array>
-----Copy XML key/value pairs below-----
View MongoDB update all matching.js
// FROM: http://www.mongodb.org/display/DOCS/Updating#Updating-update%28%29
//
// db.collection.update( criteria, objNew, upsert, multi )
// criteria - query which selects the record to update;
// objNew - updated object or $ operators (e.g., $inc) which manipulate the object
// upsert - if this should be an "upsert"; that is, if the record does not exist, insert it
// multi - if all documents matching criteria should be updated
//
// SQL VERSION:
// UPDATE myTable SET dateField = '2011-01-01' WHERE condField = 'condValue'
View materialDesignShadowHelper.less
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
*
* Example usage:
View designer.html
<link rel="import" href="../core-tooltip/core-tooltip.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
View README.md

Homebrew Meteor Formula

To install Meteor with the Homebrew formula [below][3], run:

brew install https://gist.github.com/raw/4317935/05084353d3cd50acad7e88e01c3f6463b42c0ed3/meteor.rb

This Homebrew Meteor Formula is based on https://install.meteor.com.

View waitForKeyElements.js
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@carmelyne
carmelyne / Auto Load G+
Last active Dec 17, 2015
Requires TamperMonkey http://goo.gl/EAp4d - Auto loads new posts for New G+ Layout - Copy script below as a new script
View Auto Load G+
// ==UserScript==
// @name Auto Load G+
// @include https://plus.google.com*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_addStyle
// @copyright 2013+, Carmelyne Thompson
// ==/UserScript==
/*- The @grant directive is needed to work around a major design
change introduced in GM 1.0.
You can’t perform that action at this time.