// CustomTime provides an example of how to declare a new time Type with a custom formatter. | |
// Note that time.Time methods are not available, if needed you can add and cast like the String method does | |
// Otherwise, only use in the json struct at marshal/unmarshal time. | |
type CustomTime time.Time | |
const ctLayout = "2006-01-02 15:04:05 Z07:00" | |
// UnmarshalJSON Parses the json string in the custom format | |
func (ct *CustomTime) UnmarshalJSON(b []byte) (err error) { |
Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
api guide link: https://guides.spreecommerce.com/api/
useful link: https://guides.spreecommerce.com/user/configuring_taxonomies.html
Taxonomies are the Spree system’s approach to category trees. The heading of a tree is called a Taxonomy. Any child branches are called Taxons. Taxons themselves can have their own branches.
Taxonomy represents an entire tree, whereas Taxons are the nodes that make up that tree.
class Ticket < ActiveRecord::Base | |
belongs_to :grouper | |
belongs_to :user | |
validate :user_cant_be_blacklisted, on: :confirmation | |
validate :user_cant_double_book, on: :confirmation | |
validate :grouper_cant_be_full, on: :confirmation | |
validate :grouper_cant_have_occurred, on: :confirmation |
What is a unit in TDD - a unit of work. A use-case in the system.
3 options for a unit of work:
- Return Value / Exception
- Noticable State Change (adding a user for example)
- 3rd Party Call (only place to use mock objects?)
More than just testing the implementation of the code that you're writing, or
posts GET /posts(.:format) posts#index | |
POST /posts(.:format) posts#create | |
new_post GET /posts/new(.:format) posts#new | |
edit_post GET /posts/:id/edit(.:format) posts#edit | |
post GET /posts/:id(.:format) posts#show | |
PUT /posts/:id(.:format) posts#update | |
DELETE /posts/:id(.:format) posts#destroy |
Remove me from this list and please don't contact me again by any means. That means don't e-mail me, don't call me, don't find me at conferences, don't send carrier pigeons to my house with small notes attached to their feet, don't even wave to me in the street if you see me. I'll snub you right there in public and that will be really awkward for you. I can't be held responsible if your friends don't talk to you anymore after that. And no, I don't care how great your position supposedly is, what technology it's using, where it's at, how many celebrities are invested, how close they are to closing funding, how much equity they're offering, how many times Paul Graham has high-fived the founders, how close they are to the Mission in San Francisco, how much the position is paying, how great the company is, who claims they know me that works there, how big their signing bonus is, or who I'll supposedly be working for/with. I'm not interested.
Just once more to be totally clear: don't contact me again. At al
require 'csv' | |
class Exporter | |
DEFAULT_EXPORT_TABLES = [ Invoice, InvoiceItem, Item, Merchant, Transaction, User ] | |
DESTINATION_FOLDER = "tmp/" | |
def self.export_tables_to_csv(tables = DEFAULT_EXPORT_TABLES) | |
tables.each { |klass| export_table_to_csv(klass) } | |
end |