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 | |
| # | |
| # Ruby-level LOB fetch performance test | |
| # | |
| # Measures Ruby execution time for the same operations as bench_lob_fetch.c | |
| # Tests 10,000 rows with 10KB LOBs using three different fetch modes: | |
| # 1. LONG interface (:long_as_string) - default, fast | |
| # 2. LOB locators without prefetch (:locator) - slow | |
| # 3. LOB locators with prefetch (:locator + lob_prefetch_size) - slower | |
| # |
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 | |
| # frozen_string_literal: true | |
| # Export/Import all data from/to database via stdin/stdout | |
| # Usage: | |
| # RAILS_LOG_TO_STDOUT=false bundle exec rails runner dump_data.rb export > data.jsonl | |
| # bundle exec rails runner dump_data.rb import < data.jsonl | |
| require 'json' |
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 | |
| # LICENSE: MIT | |
| # ASSITED_BY: CLAUDE CODE | |
| require 'json' | |
| require 'tempfile' | |
| # Read the claude.json file | |
| claude_json_path = File.expand_path('~/.claude.json') |
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
| # LICENSE: MIT | |
| # WARN: AI tool assisted | |
| # INFO: seems like on my USB controller both are high while port open, then low. | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <sys/ioctl.h> |
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
| #!/bin/env bash | |
| # run like: | |
| # $ find_and_rename_bad_windows_filenames.sh mypath1 mypath2 | |
| # You may need to run a few times in case there are multi-spaces at beginning or end of files. | |
| # All can be done in one go but too lazy to optimize further. | |
| find_regexp='.*/[^/]*[<>:"\\|?*'$'\b'$'\t''][^/]*' | |
| #tr_from='<>:"\\|?*\b\t' | |
| #tr_to='\-\-\-\-\-\-@\- ' |
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
| #!/bin/env ruby | |
| # Usage: chapters-youtube.rb IDofTHEfineVIDEO | |
| # see mux.rb - https://gist.github.com/akostadinov/8197947def1fe61c12a5ffffc615c969 | |
| require "json" | |
| require "open-uri" | |
| def sec_to_time(sec) | |
| sec = Integer(sec) |
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
| #!/bin/env ruby | |
| # License: MIT | |
| require 'shellwords' | |
| require 'tempfile' | |
| class MuxerCLI | |
| attr_reader :dir |
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 | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem 'concurrent-ruby', '~> 1.1.6' |
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 bash | |
| # based on https://stackoverflow.com/a/61525373/520567 | |
| # you can play with -metadata and file name as you see fit | |
| set -efu | |
| videoFile="$1" | |
| ffprobe -hide_banner \ |
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
| ;FFMETADATA1 | |
| major_brand=mp42 | |
| minor_version=0 | |
| compatible_brands=mp42mp41 | |
| title=Sharks Group Video Film.mp4 | |
| comment=some comment | |
| encoder=Lavf58.76.100 | |
| [CHAPTER] | |
| TIMEBASE=1/1000 |
NewerOlder