See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import configureStore from "./store/configureStore"; | |
| const store = configureStore(); | |
| const rootEl = document.getElementById("root"); |
| Spree::ProductProperty.class_eval do | |
| belongs_to :value_object, class_name: 'Spree::PropertyValue', foreign_key: :value_id | |
| before_validation { self.value = value_object.value if value_id and changes[:value_id] } | |
| end |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This gist provides the learning-python3.ipynb notebook file, which can be viewed and edited in a Jupyter Notebook server to learn Python 3.
| require 'fileutils' | |
| namespace :html2sprockets do | |
| desc "Setup env for gem creation" | |
| task :env do | |
| @gemname = ENV.fetch('NAME') | |
| @gemdir = File.join(ENV.fetch('GEMDIR', 'vendor/gems'), @gemname) | |
| @asset_dst_path = File.join(@gemdir, ENV.fetch('DST', 'vendor/assets')) | |
| @asset_src_paths = ENV.fetch('SRC').each_line.collect(&:strip) |
| # Ignore all | |
| * | |
| # Unignore all with extensions | |
| !*.* | |
| # Unignore all dirs | |
| !*/ | |
| ### Above combination will ignore all files without extension ### |
| class APIController < ApplicationController | |
| include JSONErrors | |
| # ... | |
| end |