Skip to content

Instantly share code, notes, and snippets.

@griest024
griest024 / ideas.md
Last active February 16, 2024 21:48
Daffodil Ideas
  • PWA subpackages meant to add opinionated application behavior and integrate with design components (composables?)
  • e.g. a service to handle checkout stepping. Daffodil would define discrete checkout steps (address, shipping, billing, and review) and export features built around this opinion. This would drastically reduce the boilerplate an app dev would need to scaffold out a new store.
@griest024
griest024 / Daffodil Driver Extension.md
Last active February 5, 2020 22:32
Details potential mechanisms for extension and customization of Daffodil platform drivers

Daffodil Driver Extension

Goals

Daffodil aims to provide driver extension mechanisms such that a user can customize a driver's behavior with minimal reimplementation. In particular, this will focus on the scenario in which a user wants to add additional fields to an object returned by a driver call.

Consider a typical REST driver call:

class Driver {
  constructor(
@griest024
griest024 / cacheable.rb
Last active April 9, 2017 18:26
an implementation of caching only acceptable responses
module Typhoeus
class Request
module Cacheable
# first checks if accetable codes have been specified and if so, only caches if an acceptable code is present
def response=(response)
Typhoeus::Config.cache.set(self, response) if cacheable? && !response.cached? && (!(codes = options[:acceptable_response_codes_for_cache]) || codes.include?(response.code))
super
end
end
end
@griest024
griest024 / hello.rb
Last active August 21, 2016 04:03
require_relative does not work on windows from inside jars packed by warbler
#./lib/hello.rb
puts "hello world"
class Symbol
def to_s
"a new string"
end
end
p :asdfsd.to_s # => RuntimeError: can't modify frozen String
# write at org/jruby/RubyIO.java:1437
# p at org/jruby/RubyKernel.java:468
# <top> at symbol.rb:7
#===============================================================================
# Filename: Game.yaml
#
# Developer: Raku (rakudayo@gmail.com)
#
# Description: This file contains all configurable parameters for the RMXP
# Plugin System.
#===============================================================================
---
#-------------------------------------------------------------------------------
p Dir.entries("directory of pkmnessentials data folder")
$DATA_INGORE_LIST = ["Scripts.rxdata","EditorScripts.rxdata","PkmnAnimations.rxdata","TilesetsTemp.rxdata","Game.rxdata"]
# Create the list of data files to export
p $INPUT_DIR
p $DATA_IGNORE_LIST
files = Dir.entries( $INPUT_DIR ) # make sure this line is here and not commented out!
p files
files -= $DATA_IGNORE_LIST
p files
files = files.select { |e| File.extname(e) == ".#{$DATA_TYPE}" }
p files
# jvm-list.sh: a list of available JVM and some shortcuts
# Copyright 2008, 2009 by Vincent Fourmond <fourmond@debian.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of