Skip to content

Instantly share code, notes, and snippets.

View darkato42's full-sized avatar
🏠
Working from home

Yulin Wu darkato42

🏠
Working from home
View GitHub Profile
@darkato42
darkato42 / stash-tile-current-ip.js
Last active December 10, 2023 16:19
stash-tiles
$httpClient.get('https://api.my-ip.io/ip', function (error, response, data) {
$done({
title: '当前 IP 地址',
content: data,
backgroundColor: '#663399',
icon: 'network',
})
})
@darkato42
darkato42 / update_proxy.sh
Last active August 5, 2023 13:43
Change proxy settings in Ubuntu
#!/bin/bash
# Check if the proxy URL is passed as an argument
if [ -z "$1" ]; then
echo "Please provide the full proxy URL as an argument. E.g., ./update_proxy.sh http://192.168.1.3:3333"
exit 1
fi
PROXY_URL="$1"
@darkato42
darkato42 / enable-long-path.reg
Last active July 30, 2023 12:26
Enable Long Paths in Windows 10, Version 1607, and Later
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001
@darkato42
darkato42 / docker-compose.yml
Created April 13, 2023 14:46
create a wireguard server in docker
version: "3.8"
services:
wireguard:
image: lscr.io/linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
@darkato42
darkato42 / thunder-collection_BenchmarkDotNet.StorageInMemory.json
Created August 24, 2022 08:12
BenchmarkDotNet.StorageInMemory HTTP Test Thunder Client Collection
{"client":"Thunder Client","collectionName":"BenchmarkDotNet.StorageInMemory Azure IIS","dateExported":"2022-08-24T08:08:13.627Z","version":"1.1","folders":[{"_id":"f3c0a277-5f2c-4e48-af02-22faaa6e8480","name":"Post benchmarks overtime","containerId":"","created":"2022-08-24T06:44:55.900Z","sortNum":10000,"settings":{}}],"requests":[{"_id":"bfab6a49-8407-4536-aa66-d089676a0fcd","colId":"c2d3ddb8-ee7b-4192-adff-858c0686fe58","containerId":"","name":"Post result Md5VsSha256","url":"https://localhost:{{port}}/api/bdnresults","method":"POST","sortNum":10000,"created":"2022-08-24T06:44:55.900Z","modified":"2022-08-24T06:55:22.618Z","headers":[],"params":[],"body":{"type":"json","raw":"{\n \"Title\":\"MyBenchmarks.Md5VsSha256-20220818-152706\",\n \"GitVersion\":{\n \"Major\": 0,\n \"Minor\": 1,\n \"Patch\": 0,\n \"PreReleaseTag\": \"\",\n \"PreReleaseTagWithDash\": \"\",\n \"PreReleaseLabel\": \"\",\n \"PreReleaseLabelWithDash\": \"\",\n \"PreReleaseNumber\": null,\n
@darkato42
darkato42 / nuget.config
Created July 19, 2022 09:12
nuget.config example
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
@darkato42
darkato42 / gist:4bed96336fe2ad33646fd8d036f4cc97
Created May 17, 2022 07:20 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@darkato42
darkato42 / setup-python3-virtual-env.md
Created May 14, 2022 09:31 — forked from MichaelCurrin/setup-python3-virtual-env.md
Set up a Python 3 virtual environment

Set up a Python 3 virtual environment

A beginner's guide to installing Python 3 and setting up a virtual environment

This guide covers how to install and upgrade Python 3 and how to create and an install into a Python virtual environment.

This is best practice in Python for both local and production code, as it isolates the scope where your python commands and pip commands run, protecting your global environment and allowing your to manage multiple virtual environments each with their own set of unique Python packages.

<iframe height='160' width='300' frameborder='0' allowtransparency='true' scrolling='no' src='https://www.strava.com/athletes/8604480/activity-summary/7493871cb425dcab12570933ac788790d9fed933'></iframe>