Instantly share code, notes, and snippets.

View h2o_ip_acl_sample.rb
ALLOW_IPS = %w{
192.168.1.1
}
class Acl
def call(env)
if ALLOW_IPS.include? env['REMOTE_ADDR']
[399, {}, []]
else
[403, {'Content-Type' => 'text/plain;charset=utf-8'}, ['Forbidden']]
View file0.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Receive Video</title>
</head>
<body>
View file0.txt
CredStore - performQuery - Error copying matching creds. Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
"r_Attributes" = 1;
sync = syna;
}
View java8-9memo.java
package norainu;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDateTime;
import java.time.Year;
import java.time.temporal.ChronoField;
View AutoCloseableTest.java
package norainu;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
// AutoClosable
public class Main {
public int b;
View file0.txt
sudo su
cd /usr/loca/src
wget https://www.openssl.org/source/openssl-1.1.1-pre8.tar.gz
tar zxf openssl-1.1.1-pre8.tar.gz
cd openssl-1.1.1-pre8
./config
make -j 4
make insatall
# 再起動
init 6
View file0.txt
# Ubuntu
sudo apt install certbot
# AmazonLinux2
sudo yum install certbot
View audioecho.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
View base64decode.rb
require 'base64'
if ARGV.size != 1
puts "usage: ruby base64decode.rb <file of base64>"
exit(1)
end
base64string = IO.read(ARGV[0])
puts Base64.decode64(base64string)
View vscode_markdown_preview_enhanced_custom.css
/* Please visit the URL below for more information: */
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
.markdown-preview.markdown-preview {
// modify your style here
// eg: background-color: blue;
h1 {
border-left: solid 10px lightblue;
border-bottom: solid 2px lightblue;