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
<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">
/**
* 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:
// 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'
@carmelyne
carmelyne / gist:d15d789bbb3b4f6e6bbf
Last active August 29, 2015 14:23
Social Media Artboard Preset for Sketch
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-----
# 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*
// 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() {
hash = { :water => 'wet', :fire => 'hot' }
puts hash[:fire] # Prints: hot
hash.each_pair do |key, value| # Or: hash.each do |key, value|
puts "#{key} is #{value}"
end
# Prints: water is wet
# fire is hot
Server:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.06
DISTRIB_CODENAME=dapper
DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS"
Ruby:
ruby 1.8.4 (2005-12-24) [x86_64-linux]
RubyGems:
RubyGems 0.9.2
WebServer:
sudo apt-get build-dep git-core
# login to remote server
ssh git@{REMOTE_SERVER}
# once logged in
mkdir example.git
# /home/git/example.git is the actual path of the above mkdir
cd example.git
# I opted out of git --bare init and just did git init
# cause I want the files as well as the differences on the git remote
git init