Skip to content

Instantly share code, notes, and snippets.

@adamelliotfields
adamelliotfields / windows-ssh-no-password-with-keys-wsl2.md
Last active April 23, 2024 21:02
Windows SSH Server with Password-less Key Authentication and Default WSL2 Shell

Windows SSH Server with Password-less Key Authentication and Default WSL2 Shell

Disclaimer: I am not a Windows Admin and I'm not even that good with PowerShell.

I wanted to be able to SSH into my Windows laptop directly into Linux. I also wanted to disable password authentication and only allow public key (RSA in my case) authentication.

Scott Hanselman wrote a blog post on how to make your default WSL2 distro your default shell for SSH. Windows OS Hub published an article on using public key

@qoomon
qoomon / conventional_commit_messages.md
Last active April 23, 2024 20:59
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@bradtraversy
bradtraversy / docker_wordpress.md
Last active April 23, 2024 20:57
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@plamentotev
plamentotev / jq_cheat_sheet.adoc
Last active April 23, 2024 20:56
jq Cheat Sheet

jq Cheat Sheet

jq is useful utility, but I use it infrequently and each time I have to check what was the filters syntax. This cheat sheet helps we to recall what is the expression that I need. Hopefully it would help others too. For full guide refer to the official jq manual.

All the jq you (usually) need

Given the following JSON:

editText.setCustomInsertionActionModeCallback(new CustomInsertionActionModeCallback());
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 23, 2024 20:53
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@ipisboomz
ipisboomz / ddt-mini-ruler.js
Last active April 23, 2024 20:49
DDTank mini map ruler
var s = document.createElement("link");
s.rel = "stylesheet";
s.type = 'text/css';
s.href = "//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css";
$("head").append(s);
$.getScript('//code.jquery.com/ui/1.12.1/jquery-ui.js', () => {
var lines = [];
@slykar
slykar / docker-compose-hackintosh.md
Last active April 23, 2024 20:49
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@tazarov
tazarov / test_chunking_chroma.py
Last active April 23, 2024 20:48
An example of how one can chunk texts from large documents in chroma using langchain.
import uuid
from chromadb.utils import embedding_functions
from langchain.schema import Document
from langchain.text_splitter import RecursiveCharacterTextSplitter
long_text = """
The Downsides of LLMs (Logical Language Models)
In the age of artificial intelligence, Logical Language Models (LLMs) represent a significant leap forward in the field of natural language processing. These models are capable of comprehending, generating, and reasoning about human languages in a way that mimics human-like understanding. While the benefits of LLMs are numerous, it's essential to also recognize the downsides that accompany these advancements. This essay will explore the negative aspects of LLMs in terms of ethics, job displacement, security, and potential biases.