In the realm of Large Language Models (LLMs), Daniel Miessler’s fabric project is a popular choice for collecting and integrating various LLM prompts. However, its default requirement to access the OpenAI API can lead to unexpected costs. Enter ollama, an alternative solution that allows running LLMs locally on powerful hardware like Apple Silicon chips or dedicated GPUs. In this guide, we’ll explore how to modify fabric to work with ollama. Step 1: Install Ollama To begin, install ollama according to ...

Prompt injections are attacks against LLM applications where an attacker is able to override the original instructions of the programmer. Neither input validation nor output filtering have so far been successful in mitigating this kind of attack. The reviewed paper presents a novel approach to defend against prompt injections by substituting (“signing”) the original instructions with random keywords very unlikely to appear in natural language. This blog post reviews the paper named “Signed-Prompt: A New Approach to Prevent Prompt Injection ...

ParrotOS is a specialized Linux distribution focusing on the needs of security professionals. It is usually run inside a virtual machine on a host machine. When the host machine has a high resolution display, running ParrotOS looks very blurry by default. This article describes which configuration changes are needed to make ParrotOS look great on such high resolution host machines. Enable Full Resolution for the VM First you need to configure your virtualization software to make the virtual machine use ...

  I wanted to write this article to remind both myself and people in similar situations about the necessary configuration changes to use HiDPI-Mode (= scaled resolutions) with an LG Ultrawide monitor on a 2019 MacBook Pro 16″ (Intel) on macOS Ventura. tl;dr: How to make it work Download the “OnScreen Control” software from here and install it. After a reboot, download BetterDisplay, install it and reboot again. Click on the BetterDisplay try icon, select “Settings”, then “Displays”, then your ...

Black is a code formatter that automatically adjusts your Python code after a well-defined rule set. In this article, I discuss the need for such a code formatter, show you how to integrate it into your IDE and also into your CI pipeline. Why you want to use a code formatter When you are a developer working as part of a team on a large project, you might have already realized there are different opinions on how particular structures in ...

In this article, I will demonstrate how to install Java OpenJDK 17 on macOS Big Sur in 2021. Update: I have created a video tutorial on how to install OpenJDK on macOS Big Sur: If you prefer written instructions, just keep reading: Download and Install OpenJDK 17 Download the .tar.gz version of OpenJDK 17 from jdk.java.net/17/ and move the file to /Library/Java/JavaVirtualMachines/ on your mac. Then, extract it and delete the archive: sudo mv openjdk-17.0.1_macos-x64_bin.tar.gz /Library/Java/JavaVirtualMachines/ cd /Library/Java/JavaVirtualMachines/ sudo tar ...

Context When developing Django web applications, one of the most popular ways to debug the performance of database queries, the values of internal variables or other custom metrics is the django-debug-toolbar. To integrate the toolbar into a Django web application, one first needs to configure a list of internal IP addresses. Only if the IP address of the web browser accessing the web application is part of this list, the toolbar will be shown. Otherwise, the toolbar is hidden (even ...

Problem: When writing HTML templates for the Django Python framework, you want to use Visual Studio Code’s auto formatting features. However, when you activate the auto-format functionality, VSCode complains that there is no formatter available for such HTML files: “There is no formatter for ‘django-html’ files installed.” Solution: First, install the beautify extension. Then, open the settings.json by pressing SHIFT - CMD - P and enter “Open Settings (JSON)”: Next, add the following block to your settings.json: "files.associations": { "**/*.html": ...

The release of GitLab 14.2 brings an exciting new feature to the management of CI/CD pipelines. Stages can now be completely omitted. Instead, the dependencies between pipeline jobs can be specified using the needs keyword. In this article, I will go into these changes and show you an example pipeline definition file making use of stageless pipelines. Traditionally, CI/CD pipelines in GitLab would consist of multiple stages and each stage would contain multiple jobs: The reasoning behind this structure was ...

Creating mock objects for data repositories is a common requirement in web application development. In this article, I will show you how to use GoMock to automatically generate mocks for your interfaces and use them inside unit tests. When you have a service that depends on a repository to fetch some data, this repository will most likely be connected to a database. A typical sequence of events could look like this: Service A requests an object X from repository B ...