Skip to content

Instantly share code, notes, and snippets.

View azumakuniyuki's full-sized avatar
🐈
On vacation

azuma, kuniyuki azumakuniyuki

🐈
On vacation
View GitHub Profile
@sasasin
sasasin / dmarc-change-monitor.js
Created February 3, 2024 06:45
Gmail の DMARC レコードの変化を検知する New Relic Synthetics Monitoring Scripted API 用 JS コード
/**
* Feel free to explore, or check out the full documentation
* https://docs.newrelic.com/docs/synthetics/new-relic-synthetics/scripting-monitors/writing-api-tests
* for details.
*/
var assert = require('assert');
// Google Public DNS の API エンドポイントに投げると JSON で DNS レコードを返してくれる
// https://developers.google.com/speed/public-dns/docs/doh/json
@xtetsuji
xtetsuji / README.md
Last active January 4, 2024 13:55
Postfix mailq viewer. queue_ids -> [From, To, Date, Subject]

mailq-list.pl - Postfix mailq viewer.

DESCRIPTION

mailq-list.pl is Postfix mailq viewer.

Normal Postfix mailq command shows only envelope information. If you want to know header information, you run postcat command every each time.

maiq-list.pl supports that you can show all queues' header information.

@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active July 28, 2024 17:23
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@mala
mala / note_vuln.md
Last active August 14, 2023 17:52
noteの独自ドメインセッションの脆弱性について報告した件

noteの独自ドメインセッションの脆弱性について報告した件

文責: mala

前置き

  • note.com (以下note) に2020年に報告した脆弱性(現在は修正済み)を解説する
  • 個人の活動として行っており所属組織とは関係がない
  • 自分がnote社に対して、問題があると指摘していたのは主に広報対応についてですが、この記事は技術的な知見を共有することを目的とするため、技術的な解説を中心にします。
  • 公開にあたってはnote社に対して確認の上で行っています。note社による修正対応は2021年までに実施されていますが、その修正内容が適切であるかどうかについて保証するものではありません。(網羅的な確認や追加の検証をしていません)
@mala
mala / meety_vuln.md
Last active December 18, 2023 05:36
Meety脆弱性 2022-11

Meety脆弱性 2022-11

文責 mala

経緯:

  • Meety退会しようと思ったがアカウントがなかったので、退会するためにアカウントを作ることにした。

免責:

  • 気になった範囲ですぐに見つかったもののうち、悪用可能なものを記載しています。
  • 好ましくないが仕様だろうというものは書いていません。
@jesusgoku
jesusgoku / smtp_credentials_generate.js
Created November 15, 2022 21:19
Obtaining Amazon SES SMTP credentials by converting existing AWS credentials (NodeJS version)
#!/usr/bin/env node
/**
* Obtaining Amazon SES SMTP credentials by converting existing AWS credentials
*
* @author Jesus Urrutia <jesus.urrutia@gmail.com>
*
* Script based on:
* https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html
*/
@qnighy
qnighy / rust-patterns.md
Last active March 20, 2024 03:33
Rustのパターンっぽいやつメモ

パターンとはその言語が抽象化できなかった敗北の歴史である。 しかしどんなに優れた言語であってもあらゆる繰り返しに勝てるわけではない。 人は必ずメタ繰り返しを欲するからだ。 そしてそれはRustも例外ではない。

ここでは、OOPでも知られているパターンよりも、Rustに特有のパターンを思いつく限りまとめてみた。名前は適当。

  • crate splitting
    • でかいcrateを分割して、見通しを良くする・再コンパイルの分量を削減する・並列コンパイルを可能にする
  • 親玉crate(全てにdependする)と殿crate(全てにdependされる)があることが多いので、だいたい束みたいな形になる。
@hyuki0000
hyuki0000 / gengo.rb
Created January 10, 2017 03:43
gengo.rb - 元号ジェネレータ。これまでに元号で使われた漢字からなるすべての二文字列を生成する(4900個)
a = '万中久乾亀亨享仁保元勝化吉同和喜嘉国大天字安宝寛寿平康延建弘徳応感慶成承授政文斉昌明昭景暦正武永治泰白祚神祥禄禎福老至興衡観護貞銅長雉雲霊養'
a.split(//).each do |x|
a.split(//).each do |y|
print "#{x}#{y},"
end
end
@xtetsuji
xtetsuji / qqns.pl
Last active October 26, 2016 16:12
Querying and logging qq.com MX to qq.com all NSes continuously.
#!/usr/bin/perl
# xtetsuji 2016/10/26
# qqns.pl - qq.com の MX を qq.com の NS 群全部に問い合わせをして、その記録を取る
#
# 何も考えず雑に書いたのでかなり適当です
# qq.com の NS のうち複数が返答しない場合があるらしく、その調査観察を行うためのスクリプトです
use v5.10;
use strict;
use warnings;
@damusix
damusix / aws_iam_secret_to_smtp_password.md
Last active May 12, 2024 03:23
Convert AWS IAM credentials to AWS SMTP credentials

Convert AWS IAM credentials to AWS SMTP credentials

If you do, or want to, use AWS to deploy your apps, you will end up using AWS SES via SMTP when you're launching an app that sends out emails of any kind (user registrations, email notifications, etc). For example, I have used this configuration on various Ruby on Rails apps, however, it is just basic SMTP configurations and crosses over to any framework that supports SMTP sendmail.

There are two ways to go about this:

Luckily, you found this MD file and the NOT SO EASY WAY is suddenly copy-pasta... sudo yum....