Skip to content

Instantly share code, notes, and snippets.

@vruc
vruc / sakura-cat-pigcha-wg-json.yaml
Created March 5, 2024 10:33
add sakura-cat-pigcha-wg-json.yaml
mixed-port: 7890
allow-lan: true
bind-address: '*'
mode: rule
log-level: info
external-controller: '127.0.0.1:9090'
dns:
enable: true
ipv6: false
default-nameserver: [223.5.5.5, 119.29.29.29]
@vruc
vruc / frpc.service
Created August 25, 2023 09:40 — forked from imyelo/frpc.service
run frp client as a service on windows and ubuntu / debian
# 1. put frpc and frpc.ini under /usr/local/frpc/
# 2. put this file (frpc.service) at /etc/systemd/system
# 3. run `sudo systemctl daemon-reload && sudo systemctl enable frpc && sudo systemctl start frpc`
# Then we can manage frpc with `sudo service frpc {start|stop|restart|status}`
# See also: https://nosame.net/use-frp-to-reverse-proxy-your-nas/
# Alternative for server:
# - Offical: https://github.com/fatedier/frp/blob/a4cfab6/conf/systemd/frpc%40.service
[Unit]
# Port of HTTP(S) proxy server on the local end
port: 7890
# Port of SOCKS5 proxy server on the local end
socks-port: 7891
# Set to true to allow connections to the local-end server from
# other LAN IP addresses
allow-lan: false
for product in PhpStorm WebStorm DataGrip IntelliJIdea CLion PyCharm GoLand RubyMine; do
echo "Resetting evaluation period for $product..."
rm ~/Library/Application\ Support/JetBrains/$product*/eval/*.evaluation.key
rm ~/Library/Application\ Support/JetBrains/$product*/options/other.xml
done
rm ~/Library/Preferences/jetbrains.*
@vruc
vruc / calculate-file-size.js
Created July 11, 2019 08:31
simple js to calculate file size
function calc(bytesCount) {
var units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "BB"];
var index = 0;
var k = bytesCount * 1.0;
if (bytesCount > 1024) {
while (true) {
k = k / 1024;
index++;
if (k < 1024 || index === units.length - 1) {
break;
@vruc
vruc / cloudSettings
Last active February 1, 2022 12:40
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-02-01T12:40:17.735Z","extensionVersion":"v3.4.3"}