Skip to content

Instantly share code, notes, and snippets.

View aereal's full-sized avatar

aereal aereal

View GitHub Profile
#!/usr/bin/env ruby
def scope_while
while true
x = 1
break
end
if x == 1
# noop
end
(() => {
const projects = Array.from(
document.querySelectorAll("[data-testid=project-row]")
);
const installedProjects = projects.filter((e) => {
const button = e.querySelector("[data-testid=project-row-button]");
if (!button) {
return false;
}
return button.textContent.trim() !== "Set Up Project";
package main
import (
"bytes"
"fmt"
"log"
"os"
"os/exec"
"runtime"
)
(() => {
const content = document
.querySelector(".main-content-inner")
.textContent.replace(/\s+/g, " ");
// init
speechSynthesis.speak(new SpeechSynthesisUtterance(""));
const utter = new SpeechSynthesisUtterance(content);
utter.lang = "ja-JP";
@aereal
aereal / doc.md
Last active October 28, 2020 04:14

オンラインショップから送信されるメールの技術的な問題点とその改善方法についてお伝えさせてください。 お問い合わせフォームに「※メールが届かないというお問い合わせが増えております」という注意が書かれていますが、この原因とその改善方法についてです。 こちらのお問い合わせはカスタマーサポートのご担当者様宛てに届くかと思いますが、オンラインショップのご担当者様へ共有いただければ幸いです。

シグマオンラインショップから配信されるメールにはSPF (Sender Policy Framework), DKIM (Domain Keys Identifier Mail) のいずれにも準拠していないため、Gmailなど一般的なメールサービスで迷惑メール・フィッシングメールとして認識されるリスクが高まっています。 その結果として、迷惑メールとして処理されメールの受信に気付かず不達と報告されるケースが増えていると推察されます。

実際に、私もオンラインショップに登録して注文しましたが登録完了以降のメールは迷惑メールとして処理されていたことを確認しております。

SPFとDKIMは、いずれも送信元のメールアドレスが確かにそのアドレスの所有者であることを確認する技術です。

#!/usr/bin/env ruby
require 'openssl'
require 'jwe'
require 'jwt'
require 'json'
private_key = OpenSSL::PKey::RSA.new(File.read('/Users/aereal/devel/src/github.com/aereal/playground-jwt/internal/key/test-private.pem'))
payload = { name: 'aereal' }
results = []
const speak = (body) => {
const synth = window.speechSynthesis;
const allVoices = synth.getVoices();
const jaVoices = allVoices.filter(v=> v.lang === 'ja-JP');
const voice = jaVoices[0];
if (!voice) {
throw new Error('voice not found');
}
const utter = new SpeechSynthesisUtterance(body);
#!/usr/bin/env ruby
class KiryuAnazu
def 破?
true
end
end
def 桐!
KiryuAnazu.new
#!/usr/bin/env ruby
repo = ENV['REPO']
puts ARGF.read.strip.gsub(/(\s+|\A)#(\d+)\b/m) {|m| "#{$1}#{repo}##{$2}" }
#!/usr/bin/env node
const isScalar = (v) => {
return !(v === null || v === undefined || typeof v === 'object');
};
const mergeObject = (a, b) => {
const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
const accum = {};
for (const k of keys) {