Skip to content

Instantly share code, notes, and snippets.

const fs = require("fs");
// Setup: Place this file in `.yarn/plugins/list-plugin.js` and the following
// to `.yarnrc.yml`:
//
// ```
// plugins:
// - path: .yarn/plugins/plugin-list.js
// ```
module.exports = {
@jimsrc
jimsrc / gpt4_text_compression.md
Last active June 18, 2024 15:03
Minimizing the number of tokens usage to interact with GPT-4.

Overview

I just read this trick for text compression, in order to save tokens in subbsequent interactions during a long conversation, or in a subsequent long text to summarize.

SHORT VERSION:

It's useful to give a mapping between common words (or phrases) in a given long text that one intends to pass later. Then pass that long text to gpt-4 but encoded with such mapping. The idea is that the encoded version contains less tokens than the original text. There are several algorithms to identify frequent words or phrases inside a given text, such as NER, TF-IDF, part-of-speech (POS) tagging, etc.

@belgattitude
belgattitude / ci-yarn-install.md
Last active July 22, 2024 09:27
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@Purpzie
Purpzie / update-lockfile.yml
Last active May 6, 2023 13:22
Action to update pnpm-lock.yaml when Dependabot opens a PR. Be warned that this may cause lots of merge conflicts.
# https://github.com/dependabot/dependabot-core/issues/1736
name: Dependabot
on: pull_request_target
permissions: read-all
jobs:
update-lockfile:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
pull-requests: write
@kf106
kf106 / ropsten-peers.txt
Last active November 21, 2022 07:26
List of active Ropsten peers found as of 30.4.2021
// For information on how to set up a Ropsten miner see https://www.linkedin.com/pulse/how-mine-ropsten-testnet-ether-keir-finlow-bates/
// For test Ropsten visit https://moonborrow.com/
// active Ropsten peer nodes found 15 Oct 2021
["enode://05b558e4f6bb2853c80fbadd669e3e6123ad10ca08e43eccb9abcc50180a55486c8fc9f8b36d85033eca3888849920fb9d29981df85d1c3ffbea504848026716@104.248.75.151:8888", "enode://ddc869dab42ee378d9ea8f3872e0d114b2a0450c2b5e533ce899249c2cf88651bb14e7250b60765d333d3419d82c328effecbf56ddfac2cfb9c19b66682b4a09@52.72.11.115:30303", "enode://deb4a2157ec32c1837a2480d6752fc388f2fd6e9d97650c5e74bd1db11de2c2855ea6c4a62630b2292b6bf46ecc06e35a3e12d63bc145d0b810a3d0d4ea59d13@18.181.27.33:30303", "enode://fe9908781f114f1306d494610478dfa8af913e48612697113b1340133be502a4797c25e319b2609e166d77d0a1382124b5bb7b449cf29c390c4067560fc5fdd7@35.153.104.230:30303", "enode://a534ad8959940358d753e6f9155af0ff39de2e300e8bb1780fad53f3fab6757ae4d3b0e499aec14157b0c56fddeb8227405d8c5976318ed84325521ca8acc5f4@54.157.217.
@ivangabriele
ivangabriele / debian-raspberry-cheatsheet.md
Last active June 15, 2024 21:23
Debian Raspberry Audio, Bluetooth and MIDI (BLE MIDI) commands cheat sheet.

Audio

ALSA

Bluetooth

Debugging

Hardware

@ivangabriele
ivangabriele / awesome-git-config.md
Last active May 31, 2022 20:06
Awesome Git Config.

Add those to you ~/.gitconfig (or %HOMEPATH%/.gitconfig under Windows):

[advice]
	skippedCherryPicks = false
	useCoreFSMonitorConfig = false

[alias]
	# Common aliases:
	br = branch
@fulldecent
fulldecent / travis-local.md
Created November 29, 2017 02:33
Run Travis build locally

travis-local.md

Preconditions:

  1. POSIX or Windows system
  2. Install Docker
  3. A GitHub repo that already builds on Travis

Postcondition:

@leommoore
leommoore / systemd_services.md
Last active April 25, 2024 02:46
Systemd Services 101

Check that your system supports systemd

pidof systemd
2733

If this return a number then your system supports systemd. Most Linux distributions in 2017 support systemd.

Check out the proceses currently running.

Since systemd starts the process then all processes will be children of systemd