app/models/account.rb:95
> validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
app/models/account.rb:327
> DEFAULT_FIELDS_SIZE = 4
くらいを変えたら増えるのかしら
app/models/account.rb:95
> validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
app/models/account.rb:327
> DEFAULT_FIELDS_SIZE = 4
くらいを変えたら増えるのかしら
うりゃうりゃ
$ git remote add fedibird https://github.com/fedibird/mastodon.git
$ git fetch fedibird
$ git cherry-pick ad6255c0f0f1e782c4c948f0a3ae632da73482d7
CONFLICT (content): Merge conflict in app/models/account.rb
$ vi app/models/account.rb
:
@@ -68,2 +68,4 @@ class Account < ApplicationRecord
+ DEFAULT_FIELDS_SIZE = 8
+
include Attachmentable
@@ -94,3 +96,3 @@ class Account < ApplicationRecord
validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
- validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
+ validates :fields, length: { maximum: DEFAULT_FIELDS_SIZE }, if: -> { local? && will_save_change_to_fields? }
@@ -326,4 +328,2 @@ class Account < ApplicationRecord
- DEFAULT_FIELDS_SIZE = 4
-
def build_fields
$ git add app/models/account.rb
$ git commit
制御棒
下から抜けたら
メルトダウン
#じあまり
ちゃんと安全側に壊れてるのすばらしい
> SELECT fields FROM accounts WHERE id=1;
:
[{"name": "Web", "value": "http://zunda.freeshell.org", "verified_at": "2018-10-09T20:18:30.550Z"}, {"name": "Keyoxide", "value": "https://keyoxide.org/f60960d80b224382ca8d831cb56c20316d6e8279", "verified_at": "2021-05-04T19:48:01.306Z"}, {"name": "商品名", "value": "ずんだもち"}, {"name": "原材料", "value": "大豆 餅米 砂糖 食塩"}]
> \d accounts
:
fields | jsonb | | |
ほむー
GitHubのプロファイルにMastodonのURLをペーストしてしばらくしたらMastodonのアイコンになってた。かっこいい!!
しかしMastodon側にはGitHubのURLを書く場所が足りないのだったw
僕はTOTPのシークレットはデバイスの外にコピーされるべきでないと思ってたんだけどRFCには安全に保管すべしとしか書いてないんだよな…
https://www.rfc-editor.org/rfc/rfc6238#section-5.1
いまだれか啓徳空港って
文字列リテラルはつながるの件
$ cat test.c; gcc test.c && ./a.out
#include <stdio.h>
#define place "world"
void main(void){puts("Hello, " place);}
Hello, world
.rodataセクションに文字列が格納されるみたいよね。文字列リテラルはそこへのポインタとして扱われるんだとおもー
$ objdump -s a.out
:
Contents of section .rodata:
2000 01000200 48656c6c 6f2c2077 6f726c64 ....Hello, world
2010 00 .
:
#include <stdlib.h>もハッシュタグわよ
@ikeji Xubuntu 22.04だったかのをそのまま使っててオプションは有効にしてあるんですよねー
fcitx-skkで変換候補をホームポジションで選べないのが僕だけらしくって悲しんでます。xfce4だとだめなのかなぁ…
ひょー
AMD製プロセッサーに複数の脆弱性 ~Athlon、Ryzen、Threadripperなどに影響 - 窓の杜 https://forest.watch.impress.co.jp/docs/news/1469386.html
64KBでいっぱいです!32KBにはBASICが詰まってる。
メモリも
まんたんに
日本からやってきた電波時計に電池を入れてみた。以前どういうわけか勝手に日本時間になったように見えたことがあったので再現するか楽しみにしつつ放置してみゆね
特にストリーミングの要らないテスト用Mastodonを一時的に走らせるのは某ヘ社が便利だと思うんだけど言いづらいご時世 #言うなよ
https://github.com/zunda/mastodon/wiki/CreateInstanceOnHeroku
もうマシニングせんた何ごとだ←
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.