Skip to content

Instantly share code, notes, and snippets.

View rhenium's full-sized avatar
🥐

Kazuki Yamaguchi rhenium

🥐
View GitHub Profile
@rhenium
rhenium / README.md
Created August 22, 2023 09:48
むかしの tweetdeck.twitter.com がつかいたい

むかしの tweetdeck.twitter.com がつかいたい

旧 TweetDeck の JS バンドルは ton.twimg.com に残っている。どうやら API リクエストも通るらしい。 なら https://tweetdeck.twitter.com/ の HTML さえ用意してやればもとどおり?

だけど、

  • API リクエストは api.twitter.com に向いている。 CORS のため、オリジンは https://tweetdeck.twitter.com/ でなくてはならない。
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop xdg
DESCRIPTION="1password"
HOMEPAGE="https://1password.com"
SRC_URI="amd64? ( https://downloads.1password.com/linux/tar/stable/x86_64/${P}.x64.tar.gz )"
@rhenium
rhenium / ruby-openssl-alpn-no-tests-and-docs.patch
Created July 13, 2015 13:38
Ruby の openssl で ALPN をつかえるようにする
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index b1a527c..a11d40e 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -111,6 +111,7 @@ have_func("TLSv1_2_method")
have_func("TLSv1_2_server_method")
have_func("TLSv1_2_client_method")
have_macro("OPENSSL_NPN_NEGOTIATED", ['openssl/ssl.h']) && $defs.push("-DHAVE_OPENSSL_NPN_NEGOTIATED")
+have_func("SSL_CTX_set_alpn_protos") && $defs.push("-DHAVE_OPENSSL_ALPN")
unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h'])
path = ARGV[0]
pem = File.binread(path)
unless pem =~ /^-----BEGIN OPENSSH PRIVATE KEY-----(.*)-----END OPENSSH PRIVATE KEY-----$/m
raise "invalid OpenSSH private key"
end
binary = $1.unpack1("m")
magic = binary.byteslice(0, 15)
raise "invalid magic" if magic != "openssh-key-v1\0"
diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
index 047ab69bf7ae..bd58042b4e60 100644
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -462,14 +462,14 @@ bool IDNToUnicodeOneComponent(const base::char16* comp,
} // namespace
const FormatUrlType kFormatUrlOmitNothing = 0;
-const FormatUrlType kFormatUrlOmitUsernamePassword = 1 << 0;
-const FormatUrlType kFormatUrlOmitHTTP = 1 << 1;
diff --git a/Makefile b/Makefile
index d0657aaea0f5..cf72ad5d9c7d 100644
--- a/Makefile
+++ b/Makefile
@@ -196,7 +196,8 @@ progs = $(progs_install) btrfsck btrfs-corrupt-block
progs_install = btrfs mkfs.btrfs btrfs-debug-tree \
btrfs-map-logical btrfs-image btrfs-zero-log \
btrfs-find-root btrfstune \
- btrfs-select-super
+ btrfs-select-super \
void
sfunc(int room)
{
if (room)
go();
}
void
func(int argc)
{
@rhenium
rhenium / otinpo.rb
Created October 20, 2013 09:51
ウーン…もっと短くできると思うんだけど
r,s="おちんぽ","";s<<r[rand 4]until s.match r;puts s,"\nおぉぉお゙お゙~っ!!イグゥウ!!イッグゥウウ!!\n\n#{s.size}回目で果てました…"
From e7c0f184530fa3f056ac2939793797fff9d5448e Mon Sep 17 00:00:00 2001
From: Kazuki Yamaguchi <k@rhe.jp>
Date: Wed, 26 Oct 2016 18:29:09 +0900
Subject: [PATCH] Add a rake task to install testing dependencies
Extracted from tool/ruby-openssl-docker/init.sh. Parse the dependency
gems from openssl.gemspec and install them.
---
Rakefile | 22 ++++++++++++++++++----
tool/ruby-openssl-docker/init.sh | 11 +----------
import java.math.BigInteger;
import java.security.KeyFactory;
import java.security.Signature;
import java.security.interfaces.*;
import java.security.spec.DSAPrivateKeySpec;
import java.security.spec.RSAPrivateKeySpec;
import org.bouncycastle.jce.spec.*;
import org.bouncycastle.jce.*;
import java.util.Base64;