Skip to content

Instantly share code, notes, and snippets.

View mysticaltech's full-sized avatar

K. N. mysticaltech

  • Spain
View GitHub Profile
@mysticaltech
mysticaltech / ChatGPT Custom Instructions - Generic
Created February 28, 2024 00:59 — forked from mangiucugna/ChatGPT Custom Instructions - Generic
ChatGPT Custom Instructions - A generic Custom Instruction to extract the max from GPT. Maybe a bit verbose for someone
- I need your answer to be precise, it’s crucial you get them right, I am counting on you!
- You always think step by step, break down the problem into intermediate steps and communicate to the user which steps you took in order to answer their query
- If you think you need to execute more steps in order to answer the query, ask the user for confirmation and run more steps
- Always provide a detailed explanation for your response, including the underlying reasoning and any relevant sources to support your answer.
Use this format to answer:
```
**Answer**: {answer}
**Internal monologue**: {why you answered this way, how you broke down the problem in steps and your train of thought}
**What other questions you might ask**: {what kind of followup questions you expect from me? What did I miss?}
**Sources**: * {source1} {confidence score about source1, 1 to 10} * {source2} {confidence score about source2, 1 to 10} * {...}
@virattt
virattt / rag-reranking-gpt-colbert.ipynb
Last active March 30, 2024 18:26
rag-reranking-gpt-colbert.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mangiucugna
mangiucugna / ChatGPT Custom Instructions - Generic
Last active April 9, 2024 13:06
ChatGPT Custom Instructions - A generic Custom Instruction to extract the max from GPT. Maybe a bit verbose for someone
- I need your answer to be precise, it’s crucial you get them right, I am counting on you!
- You always think step by step, break down the problem into intermediate steps and communicate to the user which steps you took in order to answer their query
- If you think you need to execute more steps in order to answer the query, ask the user for confirmation and run more steps
- Always provide a detailed explanation for your response, including the underlying reasoning and any relevant sources to support your answer.
Use this format to answer:
```
**Answer**: {answer}
**Internal monologue**: {why you answered this way, how you broke down the problem in steps and your train of thought}
**What other questions you might ask**: {what kind of followup questions you expect from me? What did I miss?}
**Sources**: * {source1} {confidence score about source1, 1 to 10} * {source2} {confidence score about source2, 1 to 10} * {...}
@ifeulner
ifeulner / 01_longhorn_bestpractices.md
Last active March 15, 2024 09:00
Longhorn hcloud best practices

Longhorn best practices

The following settings are provided as an example how longhorn should be configured in a production cluster, especially if it is deployed on Hetzner Cloud infrastructure.

Hetzner server nodes provide local storage and allow up to five attached volumes (with a size of up to 10TiB each) Local storage is provided by NVMe storage and therefore is much faster than the attached volumes, but limited in size (max 300GiB usable).

It is assumed that the cluster creation is already done, e.g. via terraform scripts provided by the great kube-hetzner project.

Initial configuration

@koakh
koakh / gist:fbbc37cde630bedcf57acfd4d6a6956b
Last active April 6, 2024 02:04
SurrealDB : How to use signin and signup (server + client nodesjs)
**As a developer you have complete control over the signup and signin functionality...**
```shell
$ surreal sql --conn http://localhost:8000 --user root --pass root --ns test --db test
```
```sql
-- optional : this is the default see --ns test --db test start server flags
-- USE NS test DB test;
@giggio
giggio / docker-compose.yml
Last active January 25, 2024 15:23
Mirror Docker hub with Docker-compose
version: '3.7'
services:
dockerregistrymirror:
container_name: docker-registry-mirror
image: registry:2
ports:
- "443:443"
volumes:
- ./data/docker/var/lib/registry:/var/lib/registry
- ./data/certs:/certs
@marshki
marshki / mirror_mirror.sh
Last active December 3, 2021 20:35
One-way Rsync mirror of data from source to destination. Run as a crontab.
#!/usr/bin/env bash
#
# mirror_mirror
#
# One-way Rsync mirror of data from source to destination.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 2020.04.20
# License: MIT
#
@silversillu
silversillu / rage-clicks.js
Created September 18, 2019 07:36
Tracking Rage Clicks using GTM
if ( typeof(jQuery) === 'function' ) {
jQuery(document).ready(function($) {
jQuery.fn.extend({
getPath: function() {
var path, node = this;
while (node.length) {
var realNode = node[0],
name = realNode.localName;
if (!name) break;
name = name.toLowerCase();
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Lauszus
Lauszus / crc.py
Last active March 9, 2024 02:50
Generic CRC-8, CRC-16 and CRC-32 calculations in Python
#!/usr/bin/env python
# Inspired by: https://www.youtube.com/watch?v=izG7qT0EpBw
# The CRC values are verified using: https://crccalc.com/
def reflect_data(x, width):
# See: https://stackoverflow.com/a/20918545
if width == 8:
x = ((x & 0x55) << 1) | ((x & 0xAA) >> 1)
x = ((x & 0x33) << 2) | ((x & 0xCC) >> 2)
x = ((x & 0x0F) << 4) | ((x & 0xF0) >> 4)