Skip to content

Instantly share code, notes, and snippets.

View raphaelbauer's full-sized avatar

Raphael A. Bauer raphaelbauer

View GitHub Profile
@raphaelbauer
raphaelbauer / private_rag_application.ipynb
Last active October 18, 2024 11:34
Private RAG Application Implementation Using Llama 3.2, Ollama & PostgreSQL (https://www.youtube.com/watch?v=-ikCYKcPoqU)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

General

  • Does everyone speak up? (rework, google, aristotle)
  • Are essential meetings in place. This usually means refinement sessions, dailies, review sessions and planning sessions.
  • Are stories small enough? This is the same as the “is cycle time low”.
    • Cut stories down to small increments
    • Think about clever ways to deliver to the client - fast.
    • Small iterations
  • Are stories delivered end-to-end?

IT Department Tech Due Diligence Checklist

NOTE: An updated version is available over here: https://www.raphaelbauer.com/posts/due-diligence/

General organization of the IT department

import ninja.Context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.inject.Singleton;
import java.io.IOException;
import java.io.StringWriter;
import ninja.bodyparser.BodyParserEngine;
import org.apache.commons.io.IOUtils;
@raphaelbauer
raphaelbauer / gist:8029616
Last active December 31, 2015 18:49
UnitOfWork Filter for Ninja - allows lightweight JPA usage ins resource-local mode. Annotate your classes / methods with @FilterWith(DatabaseAccess.class) to use JPA without explicit transactions.
public class DatabaseAccess implements Filter {
@Inject
private UnitOfWork unitOfWork;
@Override
public Result filter(FilterChain filterChain, Context context) {
Result result;
@raphaelbauer
raphaelbauer / gist:6329621
Created August 24, 2013 18:22
Ninja Framwork - Just a helper class that bypasses the built-in Json serializer and helps rendering the exact stuff you put as "string". Bypasses all built-in json serializers.
package conf;
import java.io.OutputStream;
import ninja.Context;
import ninja.Renderable;
import ninja.Result;
import ninja.utils.ResponseStreams;
public class ResultJsonCustom {
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.drive.DriveScopes;
import com.google.code.samples.oauth2.OAuth2Authenticator;
import com.sun.mail.imap.IMAPStore;
import java.io.File;
@raphaelbauer
raphaelbauer / gist:3121858
Created July 16, 2012 09:47
simple mocked ninja controller test
@Test
public void restRedirectToIndex() {
Result result = applicationController.redirectToIndex(context);
//assert that status is temporary redirect:
assertEquals(Result.SC_307_TEMPORARY_REDIRECT, result.getStatusCode());
//assert that Location header was set correctly
Map<String, String> headers = result.getHeaders();
@raphaelbauer
raphaelbauer / ParameterizedParameterTokenFormatter.java
Created March 30, 2012 15:11
ParameterizedParameterTokenFormatter
package com.bricktop.app.client.common.places;
import com.google.gwt.http.client.URL;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.proxy.ParameterTokenFormatter;
import com.gwtplatform.mvp.client.proxy.PlaceRequest;
import com.gwtplatform.mvp.client.proxy.TokenFormatException;
import com.gwtplatform.mvp.client.proxy.TokenFormatter;
import java.util.ArrayList;
[info] [SUCCESSFUL ] org.scalatest#scalatest_2.9.1;1.6.1!scalatest_2.9.1.jar (250ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/org/codehaus/jackson/jackson-core-asl/1.9.5/jackson-core-asl-1.9.5.jar ...
[info] [SUCCESSFUL ] org.codehaus.jackson#jackson-core-asl;1.9.5!jackson-core-asl.jar (44ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar ...
[info] [SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.3!paranamer.jar (37ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/com/google/guava/guava/r09/guava-r09.jar ...
[info] [SUCCESSFUL ] com.google.guava#guava;r09!guava.jar (120ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play-test_2.9.1/2.0/play-test_2.9.1-2.0.jar ...
[info] [SUCCESSFUL ] play#play-test_2.9.1;2.0!play-test_2.9.1.jar (62ms)
[info] Done updating.