Skip to content

Instantly share code, notes, and snippets.

@jameymcelveen
jameymcelveen / GitForDropboxUsers.md
Created Nov 4, 2016 — forked from magicseth/GitForDropboxUsers.md
git for dropbox users: Don't be afraid!
View GitForDropboxUsers.md

git is awesome

We use git at Bump for all sorts of things. Recently, we've started converting our designers and product managers. You can think about git like Dropbox: it takes files on your computer, puts them in the cloud, and lets other people work on them too. But it has some pretty rocking advantages:

Collaboration

Like Dropbox, git lets multiple people work on the same files at the same time. This is great when many people are working on a document together, or a group of people are creating assets for a website. Everyone can be contributing to the same folder and files, without fear of overwriting eachother's work, something Dropbox can scew up.

Time Machine

View jm-utils.js
var jm = jm || {};
(function() {
jm.hashPassword = function(password, salt) {
return jm.md5Hash([password, salt].join(''));
}
jm.randFour = function() {
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
}
View designer.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-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
View designer.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">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@jameymcelveen
jameymcelveen / JMWebPage.cs
Last active Aug 29, 2015
Xamarin.Forms CALayerInvalidGeometry Exception workaround
View JMWebPage.cs
//
// Add this file to your iOS project
//
using System;
using Xamarin.Forms;
namespace Common
{
public class JMWebPage : Page
{
@jameymcelveen
jameymcelveen / StyledRenderer_iOS.cs
Last active Aug 29, 2015
Pixate iOS helper for Xamarin.Forms. This class copies style info from Xamarin.Forms elements into the underlying native component.
View StyledRenderer_iOS.cs
using System;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using YourProject.iOS;
using System.ComponentModel;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using PixateFreestyleLib;
using Common;
@jameymcelveen
jameymcelveen / TheCityPluginExample
Created Oct 2, 2013
Working example of a static html Plugin for TheCity that resizes properly
View TheCityPluginExample
<!DOCTYPE html>
<html>
<body>
<div id="container">
</div>
<button id="add-button">Add More</button>
@jameymcelveen
jameymcelveen / ResizeParentSnippet
Created Oct 2, 2013
Snippet of resizeParent function needed to resize your plugin in TheCity
View ResizeParentSnippet
var resizeParent = function (url) {
var target = target || parent;
var body = document.body;
var html = document.documentElement;
var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight);
target.postMessage(height, url);
}
// usage
var parentUrl = "https://YOURSUBDOMAIN.onthecity.org";