Skip to content

Instantly share code, notes, and snippets.

@duggan
duggan / setup.py
Created March 29, 2024 12:07
OpenVoice updated setup.py for running on Apple Silicon with Python 3.11
from setuptools import setup
setup(name='MyShell-OpenVoice',
version='0.0.0',
description='Instant voice cloning by MyShell.',
long_description=open('README.md').read().strip(),
long_description_content_type='text/markdown',
keywords=[
'text-to-speech',
'tts',
@Myndex
Myndex / DarkSideOfTheLighter.md
Last active March 29, 2024 14:52
The Lighter Side of Dark Backgrounds.

The Lighter Side of Dark Backgrounds

Is light text on dark harder to read than the more common dark text on white? Or are there other factors?

First, just as an FYI, dark backgrounds are a problem specific to the old WCAG 2 math/method. And for that matter, evaluating predicted contrast using some other ratio maths. And let's not forget: maths like Weber and Michaelson are about threshold, but readability is far suprethreshold, so those methods are not particularly useful.

Polarized Opinions on Polarized Colors

There isn't significant scientific consensus that goes much beyond user preference, and indeed some people (such as myself) much prefer reverse, light text on dark. The various dark mode extensions are quite popular for this. Also total screen luminance and the ambient lighting all are signficant here, and again one of the indicators of the importance of personalization.

Nevertheless, the old WCAG 2.x math badly mangles dark color pairs, in the randomized tests last year, dark color pair

@soulawaker
soulawaker / soulawaker|adjust-org-table-font.el
Last active March 29, 2024 14:52
한글 and english font adjustment for org table, line spacing and line wrapping.
;; 한글 and english font adjustment for org table, line spacing and line wrapping.
;; I'm using this in spacemacs.
(with-eval-after-load 'org
;; org-table 한글:English proportion 1:2
;; Because font rescale apply entire emacs, choose another english font for org-table
;; Replace your favorite monospaced english font and adjust its height if needed
(set-face-attribute 'org-table nil :family "Roboto Mono" :height 105) ;; Apply a specific font on org-table only
(setq face-font-rescale-alist
'(("Roboto Mono" . 0.78571) ;; Find good ratio
("D2Coding ligature" . 1.1))) ;; Replace your favorite Monospaced 한글 font and find good ratio
@parmentf
parmentf / GitCommitEmoji.md
Last active March 29, 2024 14:51
Git Commit message Emoji
@CoffieldWeb
CoffieldWeb / python_3_aws.md
Last active March 29, 2024 14:51
Install Python 3, Pip 3, and Virtualenv in AWS Amazon Linux 2

How to install python 3, pip 3, and virtualenv in AWS Amazon Linux 2:

Update All Packages

sudo yum update

Install pip 3 and python 3

sudo yum install python3 pip3

Then install virtualenv using pip3

@OrionReed
OrionReed / DOM3D.js
Last active March 29, 2024 14:48
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; // ¯\\_(ツ)_/¯
@troyfontaine
troyfontaine / 1-setup.md
Last active March 29, 2024 14:47
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.

@ceving
ceving / Web Component for Copyright Years.md
Last active March 29, 2024 14:44
Web Component for Copyright Years
@kmobs
kmobs / frequencytester.md
Last active March 29, 2024 14:44
Frequency Tester

Frequency Testing

This will allow you to test a specific frequency that you hear when you do your resonance testing in Klipper and potentially track down where extra peaks are coming from. If something is rattling at a specific frequency, you can specify that frequency and feel around the printer until you track it down.

Code was adopted by zifnab from somewhere in Klipper.

Usage

You have to have [resonance_holder] in your printer.cfg.

The command is HOLD_RESONANCE AXIS=<axis> FREQ=int SECONDS=<seconds>

@graninas
graninas / haskell_design_showcase_projects.md
Last active March 29, 2024 14:43
Software Design Showcase Projects in Haskell

Software Design Showcase Projects in Haskell

(WIP)

  • Automatic White-Box Testing with Free Monads | Alexander Granin
    • Description: Article and showcase project about an approach to whitebox testing. Describes the idea of recordable and replayable business scenarios based on the Free Monad approach.
    • Design Approach: [Free Monads]
    • Technologies: [free, aeson]
    • Teaches for: How to make a Free monad based business logic recordable and replayable. How to use the recordings for automatic whitebox testing. How to configure this system to do integration testing.