Python 組み込みの logging モジュールを使う。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| driven_by( | |
| :selenium, | |
| using: :chrome, | |
| screen_size: [1400, 900], | |
| options: { | |
| desired_capabilities: { | |
| chromeOptions: { | |
| args: %w[headless disable-gpu], | |
| prefs: { | |
| 'modifyheaders.headers.name' => 'Accept-Language', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 新機能: | |
| 改良されたEメールダイジェスト機能 (#6252) | |
| Eメールダイジェスト機能は長い間存在していましたが、自動化されておらず、機能させるには手動でタスクを走らせる必要がありました。 多くの管理者たちは機能させるためのcronjobを設定しておらず、この機能は実際には広く使われていません。ダイジェストとは?ダイジェストは20日間非アクティブの状態で、ユーザーがその期間にメンションされた場合のみ送信されます。ダイジェストはユーザーが受信したメンションを要約してくれます。 | |
| ダイジェストがSidekiqの一部として送られるようになり、cronjobの設定は必要なくなりました。なお、ダイジェストEメールは古いプレーンテキストのものから、かわいいHTMLバージョンになりました。 | |
| 全てのEメールにHTML Eメールテンプレート (#6256, #6263, #6272, #6301) | |
| Mastodon内の全てのシステムEメールが改訂され、明瞭性とフレーズが改良されました。 デザインはレスポンシブになり、様々なEメールクライアントでテストされています。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: Be sure to set the API key further down in the code! | |
| require "net/http" | |
| require "uri" | |
| require "json" | |
| class WIP | |
| def initialize(api_key:) | |
| @api_key = api_key | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def find_duplicates | |
| `jscpd` | |
| unless File.exists?('jscpd_report.json') | |
| puts "jscpd_report.json was not generated..." | |
| return | |
| end | |
| jscpd_report = JSON.parse(File.read('jscpd_report.json')) | |
| jscpd_clones = jscpd_report["statistics"]["clones"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const hoverTime = 400 | |
| const fetchers = {} | |
| const doc = document.implementation.createHTMLDocument('prefetch') | |
| function fetchPage (url, success) { | |
| const xhr = new XMLHttpRequest() | |
| xhr.open('GET', url) | |
| xhr.setRequestHeader('VND.PREFETCH', 'true') | |
| xhr.setRequestHeader('Accept', 'text/html') | |
| xhr.onreadystatechange = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # vim: set fileencoding=utf-8 | |
| # | |
| # USAGE: | |
| # Back up your tmux old config, run the script and redirect stdout to your conf | |
| # file. Example: | |
| # | |
| # $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
| # $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package middleware | |
| import ( | |
| "context" | |
| "strings" | |
| "github.com/labstack/echo/v4" | |
| firebase "firebase.google.com/go" | |
| "google.golang.org/api/option" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= form_with(model: billboard) do |form| %> | |
| <%= tag.div class: "dropzone", data: { controller: "dropzone", dropzone_param_name_value: "billboard[images][]", dropzone_url_value: rails_direct_uploads_url, dropzone_accepted_files_value: "image/*", dropzone_max_files_value: 3, dropzone_max_filesize_value: 0.300 } do %> | |
| <div class="dz-default dz-message flex flex-col items-center"> | |
| <%= image_tag "upload.svg", size: 28, class: "colorize-black", aria: { hidden: true } %> | |
| <h5 class="font-semibold mbs-4">Drop files here or click to upload.</h5> | |
| <p class="text-sm text-subtle">Upload up to 10 files.</p> | |
| </div> | |
| <% end %> | |
| <div class="inline-flex items-center mbs-2 mie-1"> |