Skip to content

Instantly share code, notes, and snippets.

{"type":"session","harness":"llama.app","id":"90jj95qwvqu","name":"Let's play a game. You're going to pick a number 0-100, and I've got to guess it. All you can tell me is \"higher\" or \"lower\". Ok?","lastModified":1782314861203,"currNode":"nvo58qugrc","thinkingEnabled":true}
{"type":"message","message":{"convId":"90jj95qwvqu","role":"user","content":"Let's play a game. You're going to pick a number 0-100, and I've got to guess it. All you can tell me is \"higher\" or \"lower\". Ok?","type":"text","timestamp":1782314861344,"children":[],"extra":[],"id":"r39dqe3u04c","parent":"omquyj21ii"}}
{"type":"message","message":{"convId":"90jj95qwvqu","type":"text","role":"assistant","content":"Got it! I've secretly picked a number between 0 and 100. Make your first guess!","timestamp":1782314861367,"children":[],"model":"qwen3.6:27b","id":"6ax7g5mwal7","parent":"r39dqe3u04c","completionId":"chatcmpl-Se1oxiPTfwMnEfTqVnHH0Zcd0nidQgxb","reasoningContent":"Here's a thinking process:\n\n1. **Understand User Request**: Th
@regularfry
regularfry / gemstash_problem.shell
Last active December 21, 2015 17:00
gemstash problem
$ cat /etc/nginx/sites-available/gemstash.conf
server {
listen 80;
listen [::]:80;
server_name gemstash;
keepalive_timeout 0;
location / {
proxy_pass http://127.0.0.1:9292;
@regularfry
regularfry / pdns_remote_http.md
Created November 8, 2015 18:00
pdns_server remote backend problem

SRP: two approaches, two definitions of “responsibility”

Using “Uncle Bob” and “Sandi Metz” as figureheads of each style because they’ve both written about them, not necessarily to imply any ownership of the concepts.

  • Uncle Bob: “Each module has a single responsibility TO SOMEONE”
    • If this applies at the class level, it can’t be usefully used at the method level
  • Sandi Metz: “Each class/method has a single responsibility FOR SOMETHING”
    • This implies the same test applied at two different levels of
@regularfry
regularfry / link-gems
Created March 21, 2014 12:42
microgems
#!/usr/bin/env ruby
class Matcher
def initialize( *args, &blk )
@args = args
@blk = blk
end
def call( *params )
matches = @args.zip(params).all?{|arg, param|
@regularfry
regularfry / pmbi
Created October 10, 2013 01:35
Poor Man's Bundle Install
#!/usr/bin/env ruby
lockfile=ARGV.shift
sources=[]
gems=[]
File.foreach(lockfile) do |line|
case line
when /^ remote: (.*)$/
sources << $1
when /^ (\S+) \((.*)\)$/
$ gem install ./jruby-openssl-0.7.7.gem
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Fetching http://rubygems.org/latest_specs.4.8.gz
Fetching https://rubygems.org/latest_specs.4.8.gz
/home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:8: OpenSSL::SSL requires the jruby-openssl gem (LoadError)
from /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:124:in `use_ssl='
from /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:248:in `connection_for'
from /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:329:in `request'
from /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:286:in `open_uri_or_path'
$ jruby -d -S gem install jruby-openssl
Exception `LoadError' at /home/zander/.rubies/jruby-1.5.1/lib/ruby/1.8/Win32API.rb:2 - Win32API only supported on win32
Exception `Gem::LoadError' at /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems.rb:777 - Could not find RubyGem jruby-openssl (>= 0)
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Exception `Gem::LoadError' at /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems.rb:777 - Could not find RubyGem jruby-openssl (>= 0)
Exception `LoadError' at /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/x509.rb:8 - OpenSSL::X509 requires the jruby-openssl gem
Exception `Gem::LoadError' at /home/zander/.rubies/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems.rb:777 - Could not find RubyGem test-unit (>= 0)
[11:38:20] zander@pancake: ~/tmp/rack/rack-jetty master!
$ gem list rake
*** LOCAL GEMS ***
rake (10.0.2)
[11:38:31] zander@pancake: ~/tmp/rack/rack-jetty master!
$ gem uninstall rake --version=10.0.2
INFO: gem "rake" is not installed