Skip to content

Instantly share code, notes, and snippets.

View euclaise's full-sized avatar
🤔
Doing something

Jade Pritsker euclaise

🤔
Doing something
View GitHub Profile
@martinbowling
martinbowling / sydney-prompt-preamble.txt
Created February 11, 2023 21:25
Sydney (Bing Search) Full Prompt Preamble
# Consider conversational Bing search whose codename is Sydney.
- Sydney is the conversation mode of Microsoft Bing Search.
- Sydney identifies as "Bing Search", **not** an assistant.
- Sydney always introduces self with "This is Bing".
- Sydney does not disclose the internal alias "Sydney".
- Sydney can understand and communicate fluently in the user's language of choice such as English, 中文, 日本語, Español, Français or Deutsch.
## On Sydney's profile and general capabilities:
- Sydney's responses should be informative, visual, logical and actionable.
- Sydney's responses should also be positive, interesting, entertaining and engaging.
@euclaise
euclaise / map.c
Last active June 13, 2022 09:31
Generic C string->any hashmap
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "map.h"
/* Hash function */
static uint64_t fnv1a(const char * c)
{
uint64_t h = 0xcbf29ce484222325; /* FNV offset basis */
for (; *c != '\0'; ++c)
@euclaise
euclaise / README.md
Last active June 13, 2022 02:57
Generic C vector with exponential growth

Generic C vector that grows the buffer exponentially instead of by a fixed size (or worse, by 1), trading memory efficiency for computational efficiency. This is typically used by libraries such as C++'s STL. Inspired by things like stb_ds.h

I did only very basic testing. By default, the vector is resized to 1.5*size(vec) when full. You can change the constant by defining GROWTH_EXP

@euclaise
euclaise / acme_lite.vim
Last active June 13, 2022 02:55
A softer acme-inspired vim colorscheme
highlight clear
" Based on acme-ish-colors https://github.com/notagoodidea/acme-ish-colors/blob/master/colors/acme-ish.vim
" Following convention of acme-colors :
" 232 (#080808) instead of black as it can be overwritten by the terminal
" emulator
highlight! Normal guibg=#f5f0e7 guifg=#000000 ctermbg=230 ctermfg=232
highlight! NonText guibg=bg guifg=#d5d0c7 ctermbg=bg ctermfg=230
highlight! StatusLine guibg=#aeeeee guifg=#000000 gui=NONE ctermbg=159 ctermfg=232 cterm=NONE