Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
require 'active_support/core_ext/time' | |
class BusinessHoursFeature | |
# This feature is only available between the hours of 10am and 4pm | |
def enabled? | |
Time.use_zone('Pacific Time (US & Canada)') do | |
now = Time.zone.now | |
am, pm = Time.zone.parse('10:00'), Time.zone.parse('16:00') | |
weekday = !(now.saturday? || now.sunday?) |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
-- a distilation of https://github.com/elm-lang/elm-plans/issues/7 | |
{- Mailbox is renamed Dispatcher, although this name is the part I'm least certain about. | |
The address field is replaced with a dispatch field. | |
It's minor, but I've found it helpful to put dispatch second, since the signal is easier to explain. | |
-} | |
type alias Dispatcher a = | |
{ signal : Signal a | |
, dispatch : a -> Message -- the big change | |
} |
The rules for how Ember.js evaluates Handlebars templates have recently changed, and you may need to update your application's templates to ensure they continue working..
Remember that a template is always evaluated against a context object. When you render a template, values are looked up from that object. For example:
Hello, {{firstName}} {{lastName}}!
AppState (Main.elm delegates to one of these) | |
LoggedIn | |
Context.elm | |
Init.elm | |
Model.elm | |
Msg.elm | |
Subscriptions.elm | |
Update.elm | |
UrlUpdate.elm | |
View.elm |
CoffeeScript 1.7 is shaping up to be a pretty kick-ass release with significant improvements. Here are the ones I'm most excited about, in order of my own excitement.
Years of being wished for, finally granted!
-------------------------- | |
-- CORE LIBRARY IMPORTS -- | |
-------------------------- | |
import Task exposing (Task, ThreadID, andThen, sequence, succeed, spawn) | |
import Json.Decode exposing (Decoder, list, int, string, (:=), map, object2) | |
import Signal exposing (Signal, Mailbox, mailbox, send) | |
import List | |
--------------------------------- | |
-- THIRD PARTY LIBRARY IMPORTS -- |
This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo
bundle install
mate Guardfile
bundle exec jasmine init
mate spec/support/yasmine.ym
bundle exec guard
module YourAPIClient exposing (Config, otherFunctions) | |
import Http | |
import Json.Decode as Decode | |
import Json.Encode as Encode | |
-- Config | |