Skip to content

Instantly share code, notes, and snippets.

View gabecoyne's full-sized avatar

Gabe Coyne gabecoyne

View GitHub Profile
@gabecoyne
gabecoyne / ActiveResource.js
Last active May 26, 2023 03:18
ActiveResource.js
/**
* @providesModule ActiveResource
**/
'use strict';
var _ = require('underscore');
export default class ActiveResource {
@gabecoyne
gabecoyne / DimensionsHelper.js
Last active October 18, 2016 12:14
React Native Android ViewPager
'use-strict'
var React = require('react-native');
var {
Dimensions
} = React;
var DimensionsHelper = {
init : function() {
this.SCREEN_WIDTH = Dimensions.get("window").width;
class Warehouse < ActiveRecord::Base
# Data Warehousing AR
# - create env_warehouse definitions in database.yml
# - RAILS_ENV=env_warehouse rake db:schema:load
# - Warehouse.archive_all on some interval (daily, hourly, etc)
# - Truncate un-needed data from prod database!
if ENV["DATABASE_WAREHOUSE_URL"].present? # for heroku since it overwrites the database.yml
establish_connection ENV["DATABASE_WAREHOUSE_URL"]
@gabecoyne
gabecoyne / ListMine.js
Created September 29, 2011 17:07
sencha DataView autopaging help
app.views.ProductsListMine = Ext.extend(Ext.Panel, {
layout: 'card',
scroll: 'vertical',
fullscreen: true,
dockedItems: [
{
xtype: "toolbar",
title: "My Products",
items: [
{