See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory | |
git clone https://github.com/myshell-ai/OpenVoice | |
cd OpenVoice | |
git clone https://huggingface.co/myshell-ai/OpenVoice | |
cp -r OpenVoice/* . | |
pip install whisper pynput pyaudio | |
""" | |
from openai import OpenAI | |
import time |
// | |
// VirtualKeyboard.swift | |
// MacBook Air M1 Zhuyin Keyboard | |
// Written with SwiftUI ~=300 LOC, < 4hrs | |
// Created by Ethan Huang on 2021/1/13. | |
// Twitter: @ethanhuang13 | |
import SwiftUI | |
struct VirtualKeyboard: View { |
import SwiftUI | |
struct RefreshControl: View { | |
var coordinateSpace: CoordinateSpace | |
var onRefresh: ()->Void | |
@State var refresh: Bool = false | |
var body: some View { | |
GeometryReader { geo in | |
if (geo.frame(in: coordinateSpace).midY > 50) { | |
Spacer() |
import SwiftUI | |
struct HeaderView: View { | |
var body: some View { | |
HStack { | |
Image(systemName: "info.circle.fill") | |
.resizable() | |
.frame(width: 12, height: 12) | |
Text("Section Header") | |
.font(.system(size: 13)) |
This only verified for reinstall - | |
- Jun's Loader 1.04b | |
- DSM_DS918+_24922.pat 6.2.2 | |
===== check current maxlanport ===== | |
user@DiskStation:/etc.defaults$ cat synoinfo.conf|grep maxlan | |
maxlanport="2" | |
=====modify synoinfo.conf ===== | |
user@DiskStation:/etc.defaults$ sudo vi synoinfo.conf |
PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.
Here's how I combine the two, to create docs with embedded diagrams.
Get the command-line PlantUML from the download page or your relevant package manager.
import org.apache.commons.logging.LogFactory | |
import org.springframework.beans.BeansException | |
import org.springframework.context.ApplicationContext | |
import org.springframework.context.ApplicationContextAware | |
import org.springframework.context.annotation.ImportResource | |
import org.springframework.context.support.GenericXmlApplicationContext | |
import org.springframework.core.io.Resource | |
import org.springframework.stereotype.Component | |
import javax.annotation.PostConstruct |
import org.bouncycastle.util.encoders.Hex; | |
import org.web3j.crypto.*; | |
import java.math.BigInteger; | |
public class ECCExample { | |
public static String compressPubKey(BigInteger pubKey) { | |
String pubKeyYPrefix = pubKey.testBit(0) ? "03" : "02"; | |
String pubKeyHex = pubKey.toString(16); | |
String pubKeyX = pubKeyHex.substring(0, 64); |