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
| # frozen_string_literal: true | |
| # permutate.rb: MIT license. @snipsnipsnip | |
| require 'csv' | |
| require 'optparse' | |
| require 'shellwords' | |
| def main(argv=ARGV) | |
| filter = nil | |
| rest = nil | |
| need_header = false |
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
| public class GuestControl : Control | |
| { | |
| /// <summary>アタッチしたMFCのCWnd</summary> | |
| private IntPtr CWnd { get; } | |
| [DllImport("attach")] | |
| private static extern IntPtr attach(IntPtr hwnd); | |
| [DllImport("attach")] | |
| private static extern void detach(IntPtr hwnd); |
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
| $ git reset --hard E # git reset --hard origin/devel でも可 | |
| $ git cherry-pick -n D A | |
| $ git commit -m "DとA" | |
| $ git cherry-pick B | |
| $ git cherry-pick C |
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
| interface R { | |
| $(D1) | |
| $(V1) | |
| } |
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/ruby -rwebrick/httpauth/htdigest -e 'D = WEBrick::HTTPAuth::Htdigest.new(ARGV[0]); D.get_passwd(ARGV[1], ENV["U"], false) == D.make_passwd(ARGV[1], ENV["U"], ENV["P"]) or abort' /var/www/.htdigest realm |
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/ruby | |
| # * coding: utf-8 * | |
| class PDFExtract | |
| def self.main | |
| ARGV.each {|a| new.extract a } | |
| end | |
| def extract(pdf) | |
| images = parse_info(`mutool info #{pdf}`) |
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 ruby | |
| # coding: utf-8 | |
| require 'socket' | |
| ARGV.size == 2 or abort "usage: #$0 hostname port" | |
| host, port = ARGV | |
| sec = 1 |
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
| require 'socket' | |
| require 'openssl' | |
| def wrap(server) | |
| key = OpenSSL::PKey::RSA.generate(2048) | |
| cert = OpenSSL::X509::Certificate.new | |
| cert.issuer = cert.subject = OpenSSL::X509::Name.new([['CN', 'localhost']]) | |
| cert.public_key = key.public_key | |
| cert.not_before = Time.now | |
| cert.not_after = cert.not_before + 60 * 60 |
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
| require 'tempfile' | |
| class DLL | |
| include Enumerable | |
| attr_reader :path | |
| def initialize(path) | |
| @path = path | |
| 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
| 127.0.0.1 *.2mdn.net | |
| 127.0.0.1 *.adnxs.com | |
| 127.0.0.1 *.adtech.de | |
| 127.0.0.1 *.atdmt.com | |
| 127.0.0.1 *.flashtalking.com | |
| 127.0.0.1 *.msads.net | |
| 127.0.0.1 *.msecn.net | |
| 127.0.0.1 *.msn.com | |
| 127.0.0.1 *.serving-sys.com | |
| 127.0.0.1 *.doubleclick.net |