Skip to content

Instantly share code, notes, and snippets.

View johan--'s full-sized avatar

johan pretorius johan--

View GitHub Profile
@johan--
johan-- / claudette-agent.installation.md
Created October 11, 2025 14:24 — forked from orneryd/claudette-agent.installation.md
Claudette coding agent built especially for free-tier models like chatGPT-3/4/5+ to behave more similar to Claude. Claudette-auto.md is the most structured and focuses on autonomy. *Condensed* nearly the same but smaller token cost for smaller contexts, *Compact* is for mini contexts. Memories file support in v5.2

Installation

VS Code

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
  • Select "User Data Folder"
  • Give it a name (Claudette)
  • Paste in the content of any claudette-[flavor].md file (below)

"Claudette" will now appear as a mode in your "Agent" dropdown.

@johan--
johan-- / kamal-production-server-setup.sh
Created November 21, 2024 11:48 — forked from rameerez/kamal-production-server-setup.sh
Set up a Ubuntu server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# Production Docker Host Hardening Script v2
# For Ubuntu Server 24.04 LTS (Noble)
# Suitable for both Kamal deployment and builder hosts
set -euo pipefail
IFS=$'\n\t'
# --- Constants ---
@johan--
johan-- / find_or_create.exs
Created August 20, 2024 07:35 — forked from weiland/find_or_create.exs
Find or Create in Ecto
# two different ways to implement a find_or_create for Ecto
find_or_create_user = fn user ->
case Repo.all(from u in users, where: u.id == ^user.id and u.email == ^user.email) do
[] ->
%User{}
|> User.changeset(user)
|> Repo.insert!()
_ ->
IO.puts "Already inserted"
@johan--
johan-- / postgres-brew.md
Created April 24, 2020 06:54 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@johan--
johan-- / plink-plonk.js
Created February 19, 2020 13:26 — forked from MarkArts/plink-plonk.js
Listen to your web pages
@johan--
johan-- / plink-plonk.js
Created February 19, 2020 13:22 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@johan--
johan-- / static.routes.ts
Created December 9, 2019 14:23 — forked from roelofjan-elsinga/static.routes.ts
Angular routing module
import {NgModule} from '@angular/core';
import {HomeComponent} from './home/home.component';
import {AboutUsComponent} from './about-us/about-us.component';
import {ContactComponent} from './contact/contact.component';
import {UIRouterUpgradeModule} from "@uirouter/angular-hybrid";
export const StaticPagesRoutes = {
states: [
{
name: 'home',
@johan--
johan-- / dynamic.routes.ts
Created December 9, 2019 14:23 — forked from roelofjan-elsinga/dynamic.routes.ts
Dynamic routes for Angular
import {NgModule} from '@angular/core';
import {HomeComponent} from './home/home.component';
import {AboutUsComponent} from './about-us/about-us.component';
import {ContactComponent} from './contact/contact.component';
export class DependencyInjectionClass {
constructor(private _service: FictionalService) {}
resolve(route, state) {
//Get some fictional data with the id that's in the URL
@johan--
johan-- / console-logger.service.ts
Created October 28, 2019 06:47 — forked from niraj-rai/console-logger.service.ts
Logger Service and it's console logger implementation to handle logging strategy in dev and prod environment.
import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
export interface ILoggerService {
info(value: any, ...rest: any[]): void;
log(value: any, ...rest: any[]): void;
warn(value: any, ...rest: any[]): void;
error(value: any, ...rest: any[]): void;
}