この記事は議論のたたき台で、ポジショントークや、偏見にまみれています。
- 古典的なサーバーサイド WAF への +α の味付け
- 大規模なクライアントアプリケーション管理のための SPA
- SEO / SSR を考慮した Node ヘヴィーな環境
他、提唱されてるパターン
| package weakmap | |
| import ( | |
| "reflect" | |
| "runtime" | |
| "sync" | |
| ) | |
| type Key = interface {} | |
| type Value = interface {} |
| #!/bin/bash | |
| loggroup=$1 | |
| dryrun=$2 | |
| if [[ -z $loggroup || $loggroup == '--dryrun' ]]; then | |
| echo "Usage: $0 LogGroup [--dryrun]" | |
| exit 1 | |
| fi |
パターンとはその言語が抽象化できなかった敗北の歴史である。 しかしどんなに優れた言語であってもあらゆる繰り返しに勝てるわけではない。 人は必ずメタ繰り返しを欲するからだ。 そしてそれはRustも例外ではない。
ここでは、OOPでも知られているパターンよりも、Rustに特有のパターンを思いつく限りまとめてみた。名前は適当。
| import React from 'react'; | |
| import { TextInput as Input } from 'react-native'; | |
| export default class TextInput extends React.Component { | |
| static defaultProps = { | |
| onFocus: () => { }, | |
| } | |
| constructor(props) { | |
| super(props); |
2024/04/17 更新
この記事は、自作OS Advent Calendar 2017の 12/8 の記事として書かれました。
IT 系のニュースサイトでも、未だに日本語の漢字や仮名のことを 2 バイト文字と呼んでいる記事が散見されます。
| package main | |
| // This script cleans up old LogGroups (empty and olde than 90 days and old | |
| // LogStreams (last event timestamp is over 30 days old or if the logstream | |
| // is empty and has been created over 30 days ago) from AWS Cloudwatch | |
| import ( | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/cloudwatchlogs" | |
| "log" |
| /* | |
| Package fan is a little concurrent io experiment. | |
| Example Use Case | |
| ---------------- | |
| You have a function that takes a single io.Reader as an argument. You would like | |
| to pass that reader to several processing functions. You could just make the | |
| function accept an io.ReadSeeker, invoke each function serially in a for loop, | |
| seeking after each call. But that's not cool. |
| <?php | |
| /** | |
| * UserFrosting (http://www.userfrosting.com) | |
| * | |
| * @link https://github.com/userfrosting/UserFrosting | |
| * @copyright Copyright (c) 2013-2017 Alexander Weissman | |
| * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) | |
| */ | |
| namespace UserFrosting\Sprinkle\Core\Model\Relations; |
dockerのlinkオプションがレガシーなので、コンテナ間で名前解決できるようにネットワークを用意する の記事中で行った操作をdocker-composeコマンドで実行できるようにdocker-compose.ymlとしてまとめた。
$ cd my_workspace
$ mkdir ./nginx/conf.d
$ mkdir ./app
$ wget https://gist.githubusercontent.com/tamanobi/cfef34197d531945872173fcb0906cf5/raw/9201d1df12244c94b73d29ec3b4c9ffb0bc68663/php.conf -P ./nginx/conf.d
$ wget https://gist.githubusercontent.com/tamanobi/cfef34197d531945872173fcb0906cf5/raw/9201d1df12244c94b73d29ec3b4c9ffb0bc68663/app.php -P ./app