Skip to content

Instantly share code, notes, and snippets.

@rxaviers
rxaviers / gist:7360908
Last active March 28, 2024 23:19
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@piotr-marendowski
piotr-marendowski / xlib-png-demo.c
Created July 27, 2023 13:17
C demo displaying a PNG image on X server using Xlib and libspng libraries
/* requires Xlib and libspng *
* gcc -o demo demo.c -l X11 -l spng -g */
#include <stdio.h>
#include <string.h>
#include <X11/Xlib.h>
#include <spng.h>
unsigned char *process_png_image(char *filename);
int main(void)
@brooksvb
brooksvb / Uptime-Kuma-Status-Page-Dark-Mode-High-Density-Tweaks.css
Last active March 28, 2024 23:17
These CSS tweaks are for higher density display for Uptime Kuma status pages in dark mode.
:root {
--min-item-width: 28ch;
--max-item-width: .5fr;
--grid-spacing: .25rem;
--item-padding: .25rem;
}
/* Let items expand on small screens */
@media (max-width: 600px) {
:root {
@charveey
charveey / 75-noto-color-emoji.conf
Created June 29, 2019 07:14
How to better enable Color Emojis! Fontconfig ships with some config files that are simply not enough to enable color emojis globally (the 45-generic.conf and 60-generic.conf) and just by installing Noto Color Emoji font will also not enable colorful emojis on all websites or some apps. However, this can easily be configured by creating a config…
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Add generic family. -->
<match target="pattern">
<test qual="any" name="family"><string>emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 23:11
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // Β―\\_(ツ)_/Β―
@edsunman
edsunman / ThrelteUtils.ts
Last active March 28, 2024 23:11
Threlte Utilities
/**
* Returns a function that can be used to execute a child function every given number of seconds.
* @param interval - The interval in seconds.
* @param [randomMax]- The interval will be random, using this value as the upper bound and the interval param as the lower bound.
* @example
*
* const everyFiveSeconds = interval(5)
*
* useTask((delta) => {
* everyFiveSeconds(delta, () => {
@troyfontaine
troyfontaine / 1-setup.md
Last active March 28, 2024 23:11
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

git clone https://github.com/cpacker/MemGPT.git
conda create -n memgpt python=3.10
conda activate memgpt
cd memgpt
pip install -r requirements.txt
export OPENAI_API_KEY="YOUR_API_KEY"
# download .txt docs from: https://huggingface.co/datasets/MemGPT/example-sec-filings/tree/main
# place in "memgpt/personas/examples/preload_archival/*.txt"
python3 main.py --archival_storage_files_compute_embeddings="memgpt/personas/examples/preload_archival/*.txt" --persona=memgpt_doc --human=basic
@subfuzion
subfuzion / curl.md
Last active March 28, 2024 23:11
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@silver-xu
silver-xu / ts-boilerplate.md
Last active March 28, 2024 23:08
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting