Skip to content

Instantly share code, notes, and snippets.

View moeamaya's full-sized avatar
👋

Moe Amaya moeamaya

👋
View GitHub Profile
import urllib
import urllib2
NUM_OF_VOTES = 100
url = ('https://docs.google.com/forms/d/1P53FSdQV1FdeCvMSgYzxKm-PqzdnyqTcDa7eox-_7cw/formResponse')
#vote for Moe
params = {
#name
@moeamaya
moeamaya / image.html.erb
Created November 5, 2014 22:51
background image css
<div class="page-title" data-bg="image.jpg" data-bg2x="[email protected]">
# shows the svgs in the last 100
broken = Image.limit(100).reverse_order.where(mobile_720: nil)
image = Image.last(300)
# actual array of images we'll move
process = []
# add all images that aren't svgs to process array
image.each {|img| filetype = img.original.split(".").last; unless filetype.to_s == "svg"; process << img; end; }

Survive JS Critique

Overall the content is great, but just needs a bit more heirarchy and focus.

1. Value Prop Clarity

Completely understand the desire to meet everyone's needs, but the cognitive load is a bit too much to absorb on landing.

survive js

Solution - What are you selling and Value Prop

// Get element offset from top of page
function getOffset(el) {
el = el.getBoundingClientRect();
return {
left: el.left + window.scrollX,
top: el.top + window.scrollY
};
};
@moeamaya
moeamaya / ruled.js
Created April 15, 2016 23:12
Ruled surfaces in js
(function(){
var $cta = $('.home-action');
var DIV = 20;
var verticalsArr = [];
var verticalsArr2 = [];
var state = 0;
var width = $cta.width();
@moeamaya
moeamaya / flux.js
Last active February 20, 2017 02:50
var sdk = new Flux(API_KEY, {baseUrl: 'https://flux.io'});
// The main view for the app
var FluxApp = function() {
var self = Object.create(FluxApp.prototype);
var render = function() {
var authView = AuthView();
};
transition: cubic-bezier(0.16, 0.68, 0.43, 0.99);
var DESIGN = {
panelNumber: 3, // how many panels total
overallWidth: 198, // inches
overallHeight: 72, // inches
panelWidth: 42, // inches, 33 for zinc
panelHeight: 138, // inches
crop: false, // stretch
gridSize: 2, // inches, [0.1 - 2.0]
gridType: "staggered", // [staggered, square]
perfShape: "circle", // [circle, diamond, square, hexagon]
var DATA = {
// Overall totals
total_fee: 1700500, // dollars
total_production: 1200500, // dollars
total_pm: 150500, // dollars
total_consultants: 200500, // dollars
total_reserve: 130500, // dollars
// Calendar Parameters