$ pyenv virtualenv cookiecutter-starter
$ pyenv activate cookiecutter-starter
$ pip install cookiecutter
def change_multiple(list, item_field, expected_changes = ->(x) { x }) | |
change_matcher = lambda { |item| | |
expected_changes.call( | |
change { item.reload[item_field] } | |
) | |
} | |
first_item = list.first | |
rest = list[1..-1] | |
first_matcher = change_matcher.call(first_item) | |
rest.inject(first_matcher) do |matcher, item| |
// template: Create User - Facebook login - [1sp] [5hs] | |
const listTitlesSelector = '.list-header-num-cards.js-num-cards'; | |
const cardTitlesSelector = '.list-card-title.js-card-name'; | |
const storyPointRegex = /\d+(?=[sp SP])/; | |
const spentHourRegex = /\d+(?=[hs HS hr HR])/; | |
const listHeaderSummaryClass = 'list-header-summary'; | |
const listHeaderSummarySelector = `.${listHeaderSummaryClass}`; | |
const showCardCount = () => document.querySelectorAll(listTitlesSelector).forEach(title => title.classList.remove('hide')); |
Installing ruby on rails on windows from Ubuntu bash
(Optional) Install PogreSQL
Install ruby + rails
If you install rails 6+, you need to install yarn.
# get git remote url names | |
git remote -v | |
# create back up at old app | |
heroku pg:backups:capture --remote origin-remote-name-url | |
heroku pg:backups:download --remote origin-remote-name-url # optional | |
# get backup url | |
heroku pg:backups:url --remote origin-remote-name-url # return s3-amazon-url |
namespace Helpers | |
{ | |
#region --- Usings --- | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
#endregion |
import { CopyHelper } from '../../helpers/copy.helper'; | |
import { Area } from '../../models/area'; | |
export class AreaListComponent | |
{ | |
... | |
getAreas(): void | |
{ | |
this.service.getAll() | |
.subscribe(response => |
/* | |
* property: sort by property (name) - type: string | |
* property2: then sort by property2 (name) - type: string - optional | |
* areNumbers: Are property and property2 numbers? - type: boolean - optional | |
*/ | |
Array.prototype.sortBy = function(property, property2, areNumbers) | |
{ | |
return this.sort(function(a,b) | |
{ | |
var valueA = areNumbers ? 0 : ""; |