var state = {
id: 1,
points: 100,
name: "Goran"
};
var newState = {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main exposing (main) | |
| import Html exposing (Html, text) | |
| import Ordering exposing (..) | |
| a : List Int | |
| a = | |
| [ 2, 28, 6, 34, -9 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe "named scope" do | |
| describe "#similar_to" do | |
| let(:category) { Factory.create(:category) } | |
| let(:product) { | |
| Factory.create( | |
| :product, :categories => [category] | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global alias.unstage='reset HEAD --' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mustache' | |
| class Ranger < Mustache | |
| self.template = <<-template | |
| {{#range_0_to_10}} | |
| <option value="{{i}}">{{i}}</option> | |
| {{/range_0_to_10}} | |
| template | |
| def range(first, last) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'yaml' | |
| Track = Struct.new :title, :duration | |
| # An Album represents an audio medium which has title, | |
| # interpret, a pause duration between tracks and a list | |
| # of individual tracks. | |
| class Album | |
| attr_reader :title, :interpret, :pause |