Skip to content

Instantly share code, notes, and snippets.

@mtsmfm
mtsmfm / index.html
Created November 15, 2024 10:05
file upload with elem.click
<html>
<head>
<title>File upload</title>
</head>
<body>
<input id="file" type="file" hidden onchange="onFileAttached()" />
<button id="button" onclick="uploadFile()">Upload</button>
<div id="filename"></div>
</body>
@mtsmfm
mtsmfm / test.rb
Created May 26, 2025 13:53
virtual column for PG
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rails"
gem "pg"
end
require "active_record/railtie"
@mtsmfm
mtsmfm / hang.html
Last active July 9, 2025 05:52
hang.html
<html>
<head>
<title>Hang</title>
</head>
<body>
<button onclick="loop()">Start infinite loop</button>
</body>
<script>