Skip to content

Instantly share code, notes, and snippets.

@ikaruga777
ikaruga777 / README.md
Last active July 20, 2019 05:20
ernest

Ernest

@ikaruga777
ikaruga777 / README.md
Created August 16, 2019 06:37
Twitter Airchive README.md

INTRODUCTION

This archive was generated at the request of the following user:

  • @username at the time the archive was generated: UVB_76
  • Account ID: 153775174

This archive consists of machine-readable JSON files containing information associated with your account. We’ve included the information we believe is most relevant and useful to you, including your profile information, your Tweets, your DMs, your Moments, your media (images, videos and GIFs you’ve attached to Tweets, DMs, or Moments), a list of your followers, a list of accounts following you, your address book, Lists that you’ve created, are a member of, or are subscribed to, interest and demographic information that we have inferred about you, information about ads that you’ve seen or engaged with on Twitter, and more.

The information contained in this archive reflects the state of the account at the time when the archive was created. In addition, if we do not have any data associated with your account for a particular category (e.g.,

@ikaruga777
ikaruga777 / Gemfile
Created June 7, 2021 21:00
TumblrのhtmlをVuePressでもみたい
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
gem 'nokogiri'
gem 'html2md'
@ikaruga777
ikaruga777 / 0_order_state_machine.rb
Last active June 24, 2024 16:37
statesman2mermaid
class OrderStateMachine
include Statesman::Machine
state :pending, initial: true
state :checking_out
state :purchased
state :shipped
state :cancelled
state :failed
state :refunded
@ikaruga777
ikaruga777 / parse.rb
Last active March 6, 2024 10:57
SPFレコードからIP拾ってくるくん
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'spf-query'
end
domain = ARGV.first
q = SPF::Query::Record.query(domain)
def query(q, lookup_count)
@ikaruga777
ikaruga777 / cop.rb
Last active November 10, 2024 06:20
トランザクションの中でperform_laterするのを検知するCopのたたき
module RuboCop
module Cop
module ActiveJob
class PerformInTransactions < Base
MSG = 'トランザクションの中でperform_laterすなー'
BUILT_IN_TRANSACTION_METHODS = %i[transaction with_lock].freeze
def_node_search :perform_later_call, <<~PATTERN
{
# 標準的なperform_later呼び出し