Skip to content

Instantly share code, notes, and snippets.

@achesco
achesco / generate-mongo-ssl.md
Last active May 9, 2024 16:59
Generate self-signed SSL certificates for MongoDb server and client

CNs are important!!! -days 3650

Make PEM containig a public key certificate and its associated private key

openssl req -newkey rsa:2048 -new -x509 -days 3650 -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/emailAddress=example@example.com/CN=localhost' -out mongodb-cert.crt -keyout mongodb-cert.key
cat mongodb-cert.key mongodb-cert.crt > mongodb.pem
@mtisz
mtisz / mixtral-8x22B.yaml
Created May 9, 2024 14:57
Axolotl Config for Mixtral-8x22B
base_model: mistral-community/Mixtral-8x22B-v0.1
model_type: MixtralForCausalLM
tokenizer_type: AutoTokenizer
is_mistral_derived_model: false
trust_remote_code: true
load_in_8bit: false
load_in_4bit: true
strict: false
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 9, 2024 16:55
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nickrouty
nickrouty / rd-class-text-extraction.php
Created May 9, 2018 04:14
Class for extraction the text from doc, docx, xlsx, pptx and wrapper for 3rd party pdf to text library.
<?php
/**
* Class RD_Text_Extraction
*
* Example usage:
*
* $response = RD_Text_Extraction::convert_to_text($path_to_valid_file);
*
* For PDF text extraction, this class requires the Smalot\PdfParser\Parser class.
import Replicate from 'replicate'
import * as dotenv from 'dotenv'
dotenv.config()
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
})
async function main() {
const training = await replicate.trainings.create(
@TurtleP
TurtleP / README.md
Last active May 9, 2024 16:52
Visual Studio Code: Nintendo Homebrew C/C++ Config

Configurations for Nintendo Homebrew Compilation

Warning Committing the .vscode files to your git repo should not be done, as configurations are not fully portable.

The file c_cpp_configuration.json contains configurations for Nintendo 3DS, Switch, and Wii U. This helps with intellisense. Create .vscode/c_cpp_configuration.json in your project directory and then copy and paste the content as applicable.

This file was changed since it was uploaded to my GitHub repository to use the "env" JSON key. This is so more profiles can be easily created with defaults for each console and then adding extras, such as a debugging profile. On top of that, it was moved to a gist because they are much easier to update.

@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active May 9, 2024 16:51
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 22.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@CHSuworatrai
CHSuworatrai / VMware vSphere 6.x Licence Keys
Created April 8, 2021 09:20 — forked from DVSB/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
@thataustin
thataustin / generateFakeSchema.ts
Last active May 9, 2024 16:50
Create fakeSchema.ts file from your drizzle schema.ts file to automatically get objects with faker data
import ts from 'typescript'
import { readFile, stat, unlink, writeFile } from 'fs/promises'
import * as path from 'path'
import { faker } from '@faker-js/faker'
interface Column {
columnType: string
default?: any
fakeMethod?: string // Optional custom faker method
}
@stemsmit
stemsmit / ha-uninstall.sh
Last active May 9, 2024 16:49
Uninstaller for Home Assistant Supervised on Debian 10
#!/usr/bin/env bash
sudo systemctl disable apparmor
sudo systemctl disable hassio-apparmor.service
sudo systemctl disable hassio-supervisor.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
sudo rm /etc/systemd/system/hassio-supervisor.service
sudo rm /etc/systemd/system/hassio-apparmor.service