Skip to content

Instantly share code, notes, and snippets.

@liuran001
liuran001 / config.yaml
Last active May 7, 2024 02:02
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.5-240507
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@MurakamiShinyu
MurakamiShinyu / mojikumi-css-text-spacing.md
Last active May 7, 2024 02:02
InDesign文字組みアキ量設定をCSS text-spacing-trimプロパティで

InDesign文字組みアキ量設定に対応するCSSのプロパティ指定

はじめに:CSS text-spacing-trim プロパティが利用可能に!

CSS Text Module Level 4text-spacing-trim プロパティ が最近のブラウザ Chrome (Chromium) 123 以降で利用可能になりました。また、CSS組版ソフトVivliostyleでも以前から利用可能です。

この text-spacing-trim プロパティの機能(行頭・行末や連続する約物の詰めの制御)は、DTPソフトのInDesignの文字組みアキ量設定に近いものです。そこで文字組みアキ量設定に対応するCSSでの設定方法をまとめます。

text-spacing-trim プロパティの値は次の通り:

@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@nitred
nitred / optimal_mtu.md
Last active May 7, 2024 01:51
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 7, 2024 01:48
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@projectoperations
projectoperations / Vagrantfile
Created May 4, 2024 20:30 — forked from mike-hearn/Vagrantfile
Multi-machine Vagrant config with private networking
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => "server1",
:eth1 => "192.168.205.10",
:mem => "1024",
:cpu => "1"
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active May 7, 2024 01:46 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@mort3za
mort3za / git-auto-sign-commits.sh
Last active May 7, 2024 01:45
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@JBGruber
JBGruber / docker-compose.yml
Last active May 7, 2024 01:43
My compose file to run ollama and ollama-webui
services:
# ollama and API
ollama:
image: ollama/ollama:latest
container_name: ollama
pull_policy: missing
tty: true
restart: unless-stopped
# Expose Ollama API outside the container stack
@JotaRata
JotaRata / ztf_utils.py
Last active May 7, 2024 01:59
ZTF Forced Photometry service utilities
from typing import Literal
import numpy as np
import pandas as pd
import requests
import multiprocessing
from multiprocessing.pool import ThreadPool
import os
'''
# ZTF Forced photometry utilities