Skip to content

Instantly share code, notes, and snippets.

@mkckr0
mkckr0 / init.gradle.kts
Last active April 24, 2024 07:57
init.gradle.kts
// https://gist.github.com/mkckr0/97ec5b0d99feede4c19ee6f905d5e722
val repoMirrorMap = mapOf(
"https://repo.maven.apache.org/maven2" to "https://maven.aliyun.com/repository/central",
"https://dl.google.com/dl/android/maven2" to "https://maven.aliyun.com/repository/google",
"https://plugins.gradle.org/m2" to "https://maven.aliyun.com/repository/gradle-plugin",
"https://jcenter.bintray.com" to "https://maven.aliyun.com/repository/jcenter",
)
val repoReplaceMap = mapOf(
"https://maven.google.com" to "https://dl.google.com/dl/android/maven2"
@maratori
maratori / golang-mocks.md
Last active April 24, 2024 07:56
Comparison of golang mocking libraries

Comparison of golang mocking libraries

Updated 2024-04-21

Uber
[gomock][6]
[testify][2] + [mockery][3] [minimock][4] [moq][5] Google
[gomock][1]

Library

GitHub stars [![s6]][6] [![s2]][2] + [![s3]][3] [![s4]][4] [![s5]][5] [![s1]][1]
Latest release date [![d6]][r6] [![d2]][r2] + [![d3]][r3] [![d4]][r4] [![d5]][r5] [![d1]][r1]
Maintained :white_check
@1eedaegon
1eedaegon / solution.md
Last active April 24, 2024 07:55
solution: kubebuilder The CustomResourceDefinition "blah" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Trouble sample

like this: is invalid: metadata.annotations: Too long: must have at most 262144

make install # kubeduiler generated makefile

/home/lee-ubuntu/workspace/pipeline-operator/bin/kustomize-v5.3.0 build config/crd | kubectl apply -f -
customresourcedefinition.apiextensions.k8s.io/pipelines.pipeline.1eedaegon.github.io unchanged
customresourcedefinition.apiextensions.k8s.io/tasks.pipeline.1eedaegon.github.io unchanged
The CustomResourceDefinition "runs.pipeline.1eedaegon.github.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
@sohamkamani
sohamkamani / rsa.go
Created April 12, 2020 17:31
Example of RSA encryption, decryption, signing, and verification in Go
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"fmt"
)
package common
import (
"bytes"
"encoding/json"
"encoding/xml"
"io"
"net/http"
gourl "net/url"
"strings"
@xlplugins
xlplugins / Funnelkit Checkout: Dequeue Theme Assets on the checkout page
Created April 24, 2024 07:17
Funnelkit Checkout: Dequeue Theme Assets on the checkout page
add_action( 'wfacp_after_checkout_page_found', function () {
if ( function_exists( 'consulting_load_theme_scripts_and_styles' ) ) {
remove_action( 'wp_enqueue_scripts', 'consulting_load_theme_scripts_and_styles' );
}
} );
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 24, 2024 07:51
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

Me:
I am looking to build a simple GUI site that allows me to paste in some text, click "rewrite", and get rewritten, cleaned-up text back. This input text is ran through the Claude API to rewrite it. The GUI should be very simple. I just want a text box for input and a text box for output. I also two sliders on the side with labels on the ends:
Tone: casual on the left, formal on the right. The middle instructs the model to keep the tone/voice the same.
Length: shorter on the left, longer on the right.
Above these sliders, I want a model selector dropdown that let's me pick which Claude model to use. I also want a copy text button under the output textbox. The three Claude models are:
claude-3-opus-20240229. Display name "Claude 3 Opus".
claude-3-sonnet-20240229. Display name "Claude 3 Sonnet".
claude-3-haiku-20240307. Display name "Claude 3 Haiku".
@plavjanik
plavjanik / macos.reg
Created July 29, 2019 21:26
Wine macOS Settings
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wine\Mac Driver]
"LeftCommandIsCtrl"="Y"
"RightCommandIsCtrl"="Y"
"LeftOptionIsAlt"="Y"
"RightOptionIsAlt"="Y"
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs: