Skip to content

Instantly share code, notes, and snippets.

View joemocha's full-sized avatar
🎯
Focusing

joemocha

🎯
Focusing
View GitHub Profile
begin
address = EasyPost::Address.create(
:name => 'Test Person',
:street1 => '15 TANGUAY AVENUE',
:city => 'Nashua',
:state => 'NH',
:zip => '03062',
:country => 'US',
:phone => '201-273-8374',
:residential => false
@joemocha
joemocha / designer.html
Created October 17, 2014 03:22
designer
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@joemocha
joemocha / symbol_vs_string.rb
Created August 19, 2014 00:56
Benchmark for comparing symbol and string usage
require 'benchmark'
str = Benchmark.measure do
10_000_000.times do
"test"
end
end.total
sym = Benchmark.measure do
10_000_000.times do
@joemocha
joemocha / home.html
Created February 12, 2014 20:55
google ad for the frontpage
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type="text/javascript">
// <![CDATA[
/*
App Data
Changeable
*/
#! /bin/sh
# Run this from the folder you want to be the parent of your docs
# By default, generated docs go into
# titanium_mobile/dist/apidoc/ti_mobile_docs/
#
# This can be changed below
git clone https://github.com/appcelerator/titanium_mobile.git
cd titanium_mobile
sudo apt-get install python-setuptools python-dev
<article class='activity_stream_message' id='activity_stream_message_4f7130161aabef3963000026'>
<aside class='user-thumbnail'>
<figure>
<img alt="Picture_100x100" height="100" src="/assets/missing/picture_100x100.jpg" width="100" />
</figure>
</aside>
<aside class='stream_message_content'>
<section>
<a href="#" class="bookmark " path="/events/4f6c0c7c1aabef4d8c000005" title="Let's Go!"> </a>
<header>
{
"login": "asdfasdfas",
"password": "ASDF354asda@sss",
"validation_mode": ":live"
}
@joemocha
joemocha / gist:1811956
Created February 13, 2012 00:04
rbenv this Mf'er
namespace :rvm do
task :bootstrap do
run "echo 'Overwrote rvm:bootstrap'"
rbenv_script = <<-SH
#!/bin/bash
#
# And now install rbenv
export PATH=$PATH:$HOME/bin:$HOME/.rbenv/shims
VERSION='#{ruby_version}'
- simple_form_for @user, :url => user_account_path(@user), :html => { id: "user_form", method: "put", multipart: true, remote: true } do |f|
@joemocha
joemocha / gist:1046580
Created June 25, 2011 15:17
mark.json
{"success":true,"user":{"user":{"avatar":{"url":"/people/17/a001.jpg","icon":{"url":"/people/17/icon_a001.jpg"},"thumb":{"url":"/people/17/thumb_a001.jpg"},"profile":{"url":"/people/17/profile_a001.jpg"},"medium":{"url":"/people/17/medium_a001.jpg"}},"bio":"--- \n- Tenetur voluptatum impedit iure. Sapiente amet quisquam et ipsam molestias quasi. Eum ab dignissimos sed vero et doloribus quis aut. Eum iure natus doloribus corrupti qui molestiae qui. Quas ut qui laboriosam repudiandae esse.\n- Distinctio est molestiae aut tempora. Unde quod molestias et amet exercitationem. Aliquid autem dolore ad eos non earum libero voluptas.\n","city":null,"confirmed":false,"country":"US","created_at":"2011-06-23T07:35:35-04:00","crypted_password":"459e993b3667ae610e93e0e7422076ffc68c938e","date_of_birth":null,"email":"mark@example.com","enabled":true,"file_id":null,"first_name":"Mark","follower_of":3,"id":17,"last_name":"Will","last_status_id":"--- !ruby/object:BSON::ObjectId \ndata: \n- 78\n- 3\n- 37\n- 11\n- 66\n- 87\n- 33