超雑にまとめました。修正してください。
登場人物
- アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
- 後輩: 頼んでばっかしで役に立たない。
- サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
- プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
#!/bin/bash | |
set -ex | |
find $HOME/Downloads -mtime +3 ! -type d -delete | |
find $HOME/Downloads -type d -empty -delete | |
# with cron | |
# * * * * * bash $HOME/bin/download-clear |
リポジトリにやったことは書いてあるし、今回やらなかったことは出来なかったことなので省略。
いくつか思い出深いものだけ言及していく。
import { Compilation, Compiler, sources } from 'webpack'; | |
interface Options { | |
filename: string; | |
} | |
interface Manifest { | |
[key: string]: string[]; | |
} |
# frozen_string_literal: true | |
class ApplicationRecord < ActiveRecord::Base | |
self.abstract_class = true | |
# List all model classes | |
def self.models | |
@models ||= begin | |
models = [] | |
Rails.root.join('app', 'models').glob('**/*.rb') do |path| |
#!/usr/bin/perl -- | |
use strict; | |
use warnings; | |
use utf8; | |
# mastodonのdockerコンテナの rails console はreadline がUS-ASCIIなので、文字列リテラルはエスケープが必要 | |
sub escapeNonAscii($){ | |
my($a) = @_; | |
$a =~ s/([\x{80}-\x{fffff}])/"\\u{".sprintf("%x",ord $1)."}"/ge; | |
$a; |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'pathname' | |
require 'yaml' | |
VERSION = '0.0.1' | |
HOMEDIR = Pathname.new(ENV['HOME']) | |
options = { |