Skip to content

Instantly share code, notes, and snippets.

document.addEventListener('resume', function() {
if(window.ea_timeoutId) {
clearTimeout(window.ea_timeoutId);
}
window.ea_timeoutId = setTimeout(function() {
launchURL = steroids.app.getLaunchURL();
matches = launchURL.toString().match(/\/\/(\w+)\?\w+=(\w+)/);
action = matches[1];
id = matches[2];
# Credits to @danyhunter for initial idea and implementation
# https://github.com/danyhunter
( () ->
if typeof angular is 'undefined'
return
module = angular.module 'SteroidsKeyboardFix', []
module.directive 'input', () ->
class Product < ActiveRecord::Base
belongs_to :category
has_many :trackings
has_many :site_product_prices, -> { order(:id => :asc) }
has_many :user_price_alerts
after_create :extract_color_from_name, :update_brand_and_model_number_if_blank, :remove_false_values, :run_delayed_jobs
validates_presence_of :name
<?php
/**
* @file
* leaflet powered custom maps for townelake homes.
* by Jake Craige @ Poetic Systems
*/
/**
* How To Import Lots
* TL:DR Delete all current lots(feed/json), import feed lots, import json lots
sortAndGroup = (objects)->
sorted = _.sortBy objects, (object)->
object.date
.reverse()
grouped = _.groupBy sorted, (object)->
object.date
_.inject grouped, (results, val, ind)->
results.push { date: { value: ind, activities: val} }
eventPlanningApp.controller 'ActivityParkingCtrl', ($scope, Message, Activities, NativeNavigation) ->
$scope.activity = Activities.current()
$scope.update = ()->
Activities.update $scope.activity
Message.broadcast 'updateActivity'
NativeNavigation.back()
$scope.open = (page) ->
NativeNavigation.goTo('views/eventPlanning/'+page+'.html')
( () ->
#Protects views where angular is not loaded from errors
if typeof angular == 'undefined'
return
'use strict'
module = angular.module('PrivateNoteModel', ['OrmModel'])
module.factory 'PrivateNotes', (Orm) ->
<script type="text/javascript">
document.addEventListener("deviceready", deviceReady);
function deviceReady() {
jQuery('.scroll-wrapper').css('min-height', $(window).height() - 55 + 'px');
}
</script>
### UTILITY METHODS ###
def create_visitor
@visitor ||= { :name => "Testy McUserton", :email => "[email protected]",
:password => "changeme", :password_confirmation => "changeme" }
end
def find_user
@user ||= User.first conditions: {:email => @visitor[:email]}
end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>It’s time to go shopping with Worth It!</title>
<style type="text/css">
/***********
Originally based on The MailChimp Reset from Fabio Carneiro, MailChimp User Experience Design