title: 技術的負債とは何だったのか
技術的負債はなくならないのか
...
- 藤村大介
- https://twitter.com/ffu_
- CTO @ 株式会社マチマチ
- エンジニア採用中です
| import matplotlib.pyplot as plt | |
| import subprocess | |
| import datetime | |
| raw = ( | |
| subprocess.Popen( | |
| 'git log --pretty=" %at, %h" --reverse --after "2020/01/01" .rubocop_todo.yml', | |
| shell=True, | |
| stdout=subprocess.PIPE, | |
| ) |
| i = 1 | |
| entries = [] | |
| name = 'fujimura' | |
| until entries.length > 0 && entries.last['full_name'] =~ %r{2017/12} | |
| r = HTTPClient.get( | |
| 'https://api.esa.io/v1/teams/proper-inc/posts', | |
| access_token: ENV['ESA_TOKEN'], | |
| q: "in:日報 user:#{name}", | |
| page: i |
title: 技術的負債とは何だったのか
技術的負債はなくならないのか
...
| require 'cli/ui' | |
| unless ActiveRecord::SchemaMigration.table_exists? | |
| abort "Schema migrations table does not exist yet." | |
| end | |
| def migrations | |
| ActiveRecord::Base.connection.migration_context.migrations_status.map do |status, version, name| | |
| "#{status.ljust(8)} #{version.ljust(14)} #{name}" | |
| end |
| const fs = require("fs"); | |
| const { execSync } = require("child_process"); | |
| const path = require("path"); | |
| const puppeteer = require("puppeteer"); | |
| const htmlToPdf = async src => { | |
| const browser = await puppeteer.launch(); | |
| try { | |
| const dest = `${path.basename(src)}.pdf`; |
| require 'json' | |
| def get_lonlat_in_spiral(i) | |
| v = Complex.polar i, i/4.9 * Math::PI/2 | |
| angle = v.angle | |
| magnitude = v.magnitude | |
| [magnitude * Math.cos(angle), magnitude * Math.sin(angle)] | |
| end | |
| r = 10.upto(30).map { |i| get_lonlat_in_spiral(i) } |
| SELECT | |
| ST_ASText( | |
| ST_GeometryN( | |
| ST_GeneratePoints( | |
| ST_GeomFromText('MULTIPOLYGON (((102.7687 35.07, 104.4969 35.07, 104.4969 35.06, 102.7687 35.06, 102.7687 35.07)))', 4326), | |
| 1 | |
| ), | |
| 1 | |
| ) | |
| ) |
| #!/bin/sh | |
| # Taken from https://prettier.io/docs/en/precommit.html#option-3-bash-script and added (s)css as target | |
| jsfiles=$(git diff --cached --name-only --diff-filter=ACM "*.js" "*.jsx" "*.css" "*.scss" | tr '\n' ' ') | |
| [ -z "$jsfiles" ] && exit 0 | |
| # Prettify all staged .js files | |
| echo "$jsfiles" | xargs yarn run prettier --write | |
| # Add back the modified/prettified files to staging | |
| echo "$jsfiles" | xargs git add |
| // @flow | |
| type A = { | |
| x: number, | |
| y: number, | |
| type: "A" | |
| }; | |
| type B = { | |
| x: number, |
| module Match | |
| def self.define_matchers!(m) | |
| m.constants.each {|c| | |
| eval "class #{c} < StandardError; end" | |
| } | |
| end | |
| def self.match! obj | |
| raise self.const_get(obj.class.to_s).new(obj) | |
| end |