Skip to content

Instantly share code, notes, and snippets.

@beowolx
beowolx / openchat_3_5.preset.json
Created December 22, 2023 16:49
This is the prompt preset for OpenChat 3.5 models in LM Studio
{
"name": "OpenChat 3.5",
"load_params": {
"n_ctx": 8192,
"n_batch": 512,
"rope_freq_base": 10000,
"rope_freq_scale": 1,
"n_gpu_layers": 80,
"use_mlock": true,
"main_gpu": 0,
#cloud-config
# This is the user-data configuration file for cloud-init. By default this sets
# up an initial user called "ubuntu" with password "ubuntu", which must be
# changed at first login. However, many additional actions can be initiated on
# first boot from this file. The cloud-init documentation has more details:
#
# https://cloudinit.readthedocs.io/
#
# Some additional examples are provided in comments below the default
version: "2"
networks:
gitea:
external: false
services:
gitea:
image: gitea/gitea:latest
environment:
@Darkflib
Darkflib / agents
Last active July 15, 2018 18:22
consul in docker
docker run -d --restart unless-stopped --name consul --net=host -v consul:/consul/data \
-e CONSUL_BIND_INTERFACE=wg0 -e 'CONSUL_LOCAL_CONFIG={"datacenter":"nbg", "leave_on_terminate": true}' \
consul agent -retry-join=10.88.88.3 -retry-join=10.88.88.5 -retry-join=10.88.88.7
@Darkflib
Darkflib / distributed minio
Created July 15, 2018 14:35
distributed containerised minio with a private network over 6 machines
docker run -d --restart unless-stopped -e MINIO_ACCESS_KEY=AKAARDVARKS -e MINIO_SECRET_KEY=oobidoobidowahwahwahwahhuba \
-v /mnt/minio:/minio \
--network host \
minio/minio server \
http://10.98.88.3/minio \
http://10.98.88.4/minio \
http://10.98.88.5/minio \
http://10.98.88.6/minio \
http://10.98.88.7/minio \
http://10.98.88.9/minio
@ubergesundheit
ubergesundheit / readme.md
Last active June 24, 2024 06:57
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@Darkflib
Darkflib / install-kube.sh
Last active May 27, 2018 19:59
kube - ubuntu
#!/bin/sh
#########
#
# Note: this does not provide a production ready cluster. It will produce a dev cluster with a single etcd daemon.
#
##########
apt-get -y update
apt-get -y upgrade
apt-get -y install apt-transport-https ca-certificates curl software-properties-common tmux vim
@LTGIV
LTGIV / dnscc.bash
Last active September 23, 2018 18:48
DNSControl Compiler
#!/usr/bin/env bash
: <<'!COMMENT'
DNSControl Compiler v201712120445
Louis T. Getterman IV (@LTGIV)
https://Thad.Getterman.org/2017/12/11/dnscontrol-compiler
# DNSControl
https://github.com/StackExchange/dnscontrol
https://github.com/StackExchange/dnscontrol/blob/master/docs/getting-started.md
@slightlyoff
slightlyoff / push_payloads_userland.md
Last active September 30, 2022 23:11
Delivering H/2 Push Payloads To Userland

Background

One of the biggest missed opportunities thus far with HTTP/2 ("H/2") is that we are not yet able to sunset WebSockets in favor of H/2. Web Sockets and H/2 both support multiplexing messages bi-directionally and can send both textual and binary data.

Server Sent Events ("SSE"), by contrast, are not bi-directional (they're a "server-push-only" channel) and binary data cannot be sent easily. They are, however, very simple to implement. Adding to the menagerie of options, RTCPeerConnection can also be used to signal data to applications in a low-latency (but potentially lossy) way.

Because H/2 [does not support the handshake (upgrade) that WebSockets use to negotiate a connection](https://daniel.haxx.se/blog/2016/06/15/no-websockets-

@tj
tj / snippets.coffee
Last active September 1, 2018 19:01
Atom snippets for Go
'.source.go':
'Options':
'prefix': 'options'
'body': '''
// Option function.
type Option func(*$1)
// New with the given options.
func New(options ...Option) *$1 {