Skip to content

Instantly share code, notes, and snippets.

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

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

@jameymcelveen
jameymcelveen / jm-utils.js
Created January 30, 2016 01:24
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);
}
@jameymcelveen
jameymcelveen / designer.html
Last active August 29, 2015 14:08
designer
<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;
@jameymcelveen
jameymcelveen / designer.html
Last active August 29, 2015 14:08
designer
<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 August 29, 2015 14:05
Xamarin.Forms CALayerInvalidGeometry Exception workaround
//
// 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 August 29, 2015 14:05
Pixate iOS helper for Xamarin.Forms. This class copies style info from Xamarin.Forms elements into the underlying native component.
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 October 2, 2013 13:14
Working example of a static html Plugin for TheCity that resizes properly
<!DOCTYPE html>
<html>
<body>
<div id="container">
</div>
<button id="add-button">Add More</button>
@jameymcelveen
jameymcelveen / ResizeParentSnippet
Created October 2, 2013 13:11
Snippet of resizeParent function needed to resize your plugin in TheCity
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";