Skip to content

Instantly share code, notes, and snippets.

@Harold2017
Harold2017 / i18n.md
Created September 2, 2022 09:16
Avalonia I18N Setting

Add language resource to App.axml:

<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceInclude Source="avares://MyAssembly/Assets/Languages/Lang.ENG.xaml"></ResourceInclude>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
</Application.Resources>
@boypt
boypt / gist:80d9ecaaa7f3c799c525e91f3c0b35d1
Created February 22, 2019 14:27
v2ray-core 流量统计 StatsService 使用要点
StatsService API获得数据统计功能,配置里面必须满足以下条件
1. `"stats":{}`对象的存在
2. `"api"`配置对象里面有`StatsService`
3. `"policy"`中的统计开关为true,除了各个用户的统计,还有全局统计
4. clients里面要有email
5. 有个专用的`dokodemo-door`协议的入口,tag为api
6. routing里面有inboundTag:api -> outboundTag:api的规则
另外:
#
# This is a little script to populate Firefox Sync with
# fake password records. Use it like so:
#
# $> pip install PyFxA syncclient cryptography
# $> python ./upload_fake_passwords.py 20
#
# It will prompt for your Firefox Account email address and
# password, generate and upload 20 fake password records, then
# sync down and print all password records stored in sync.
@thirteen37
thirteen37 / pixel-arch.md
Last active June 6, 2020 07:47
Installing Arch on the Chromebook Pixel

This describes my basic Arch Linux installation on my Chromebook Pixel.

Note: I'm a coward, so I installed Arch to an SD card instead of wiping out the existing SSD.

Requirements

  • SD card. A very minimal Arch installation with XFCE will need about 2GB, so I think 4GB is the minimum you can get by with.
  • Arch installer on a USB drive. The 2013.05.01 is broken with the recent netctl change. So either get an older or newer one.
  • Some Arch Linux familiarity.
  • Time, patience, and good eyesight.
@joergschiller
joergschiller / a2dp_sink_ubuntu_linux.md
Created January 24, 2012 23:05
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink: