Skip to content

Instantly share code, notes, and snippets.

View bsbodden's full-sized avatar

Brian Sam-Bodden bsbodden

View GitHub Profile
@bsbodden
bsbodden / redis-bloom-cli-demo.md
Last active October 7, 2021 17:37
Redis Bloom CLI Demo

Keys / Key Spaces / Expire / Scan / Get/Set

set actor:001 "Cobie Smulders"
exist actor:001
get actor:001
get "actor:001"
get 'actor:001'
type actor:001
@bsbodden
bsbodden / machine.js
Created June 13, 2020 14:47
Generated by XState Viz: https://xstate.js.org/viz
const askForProduct = (context, event) => {}
const confirmOperation = (context, event) => {}
const askForReplacementReason = (context, event) => {}
const askForReplacementReasonExplanation = (context, event) => {}
const regularExchangeFlow = Machine(
{
id: 'regular-exchange',
initial: 'inactive',
context: {
operation: 'exchange',
@bsbodden
bsbodden / machine.js
Created June 13, 2020 14:41
Generated by XState Viz: https://xstate.js.org/viz
const askForReasonForRemoval = (context, event) => {}
const askForReplacementReasonExplanation = (context, event) => {}
const confirmOperation = (context, event) => {}
const removeProductsFlow = Machine(
{
id: 'remove-products',
initial: 'inactive',
context: {
@bsbodden
bsbodden / machine.js
Last active June 13, 2020 14:40
Generated by XState Viz: https://xstate.js.org/viz
const askForProduct = (context, event) => {}
const confirmOperation = (context, event) => {}
const installProductsFlow = Machine(
{
id: 'install-products',
initial: 'inactive',
context: {
operation: 'install',
targetProduct: null,
@bsbodden
bsbodden / binnacle-heroku-add-on-test-instructions.asc
Last active May 9, 2016 19:02
Binnacle Heroku Add-on Test Instructions
Verifying that +bsbodden is my blockchain ID. https://onename.com/bsbodden
@bsbodden
bsbodden / drools_loans_dsl.txt
Created August 10, 2015 03:38
Drools Loans DSL snippet
[condition][]the lender is “{mortgage_company}"=
mortgage:Mortgage(lender:lenderName == “{mortgage_company}",product:mortgageName)
[condition][]and there is an application=
application:LoanApplication(lenders contains lender)
[condition][]- with a FICO score below {score}=ficoScore<{score}
[consequence][]reject the application because “{message}"=
application.addMessage("Declined by " + lender + " because {message}");
@bsbodden
bsbodden / acme_fico_rule
Created August 10, 2015 03:36
ACME-Fico DSLR Rule
rule "ACME-Fico"
when
the lender is "ACME Mortgage"
and there is an application
- with a FICO score below 680
then
reject the application because "a FICO score of at least 680 is required"
end
@bsbodden
bsbodden / BaseDroolsTestCase.java
Created August 9, 2015 20:05
Base Drools JUnit Test Case
package org.integrallis.drools.junit;
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;
import org.junit.After;
import org.junit.Before;
public abstract class BaseDroolsTestCase {
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.2.xsd">
<TCP
bind_port="7800"
loopback="false"
recv_buf_size="${tcp.recv_buf_size:20M}"
send_buf_size="${tcp.send_buf_size:640K}"
max_bundle_size="64K"
max_bundle_timeout="30"