Skip to content

Instantly share code, notes, and snippets.

View carmelyne's full-sized avatar
🏡
Working from home

Carmelyne Thompson carmelyne

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

##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)"
# 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*
// 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'
/**
* 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:
@carmelyne
carmelyne / README.md
Created December 30, 2013 05:52 — forked from groodt/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.

/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@carmelyne
carmelyne / Colors.xml
Created January 5, 2012 18:41 — forked from katrinkerber/Colors.xml
Dark Dreamweaver theme based on 'minimal Theme' for TextMate (http://minimaldesign.net/downloads/tools/textmate-theme). Optimised for HTML, CSS, JS and PHP. For installation see http://is.gd/Add9mq. Set background color to #25221C.
<codeColors>
<colorGroup>
<syntaxColor id="CodeColor_HTMLEntity" text="#AECD9D" bold="true" />
<syntaxColor id="CodeColor_JavascriptNative" text="#FCFFE7" />
<syntaxColor id="CodeColor_JavascriptNumber" text="#FBAA21" />
<syntaxColor id="CodeColor_JavascriptClient" text="#FCF296" />
<syntaxColor id="CodeColor_JavascriptSpryKeywords" text="#FF6208" />
<syntaxColor id="CodeColor_JavascriptSpryClasses" text="#FF6208" />
<syntaxColor id="CodeColor_TemplateText" text="#999999" />
<syntaxColor id="CodeColor_TemplateCommentText" text="#82806F" />
@carmelyne
carmelyne / updatechromiumnightly
Created October 27, 2011 10:53 — forked from craSH/updatechromiumnightly
Simple script to automatically download and install the latest available Chromium nightly build for Mac OSX
#!/bin/bash
#
# Simple script to update OSX Chromium to the latest nightly build.
# Will not download if you already have the latest (call with --force
# to override this check)
#
# Copyleft 2010 Ian Gallagher <crash@neg9.org>
#
LATEST=$(curl -s "http://build.chromium.org/f/chromium/snapshots/Mac/LATEST")
// Examples:
//
// HTML:
// <form action='messages/1/mark_unread'><input type='submit' class='button_to_link' value='Mark Unread'/></form>
//
// Rails:
// button_to "Mark as unread", mark_as_unread_message_path(message), :method => :put, :class => "button_to_link"
//
// jQuery:
// $(document).ready(function() {