This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# converts dendron note structure to obsidian note structure | |
# - removes frontmatter | |
# - adds tags | |
# - converts internal links | |
# - ignores empty (frontmatter-only) notes | |
# | |
# use at your own risk | |
import glob | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData('Text', text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported('copy')) { | |
var textarea = document.createElement('textarea'); | |
textarea.textContent = text; | |
textarea.style.position = 'fixed'; | |
/* Prevent scrolling to bottom of page in MS Edge.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2021 Daniel Ethridge | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData("Text", text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setting 基础配置(默认位置 `C:\Users\{{UserName}}\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json`): | |
``` | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source_index=source_index | |
target_index=target_index | |
elastic_search_server=elasticsearch:9200 | |
# Make sure the source index is actually open | |
curl -X POST "${elastic_search_server}/${source_index}/_open" | |
# Put the source index in read-only mode | |
curl -X PUT "${elastic_search_server}/${source_index}/_settings" \ |
This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.
- Windows 10 Home
- Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2)
- Build Vim with the clipboard option enabled
- Set up VcXsrv Windows X Server
You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:
- Start the
ssh-agent
from Windows Services:
- Type
Services
in theStart Menu
orWin+R
and then typeservices.msc
to launch the Services window; - Find the
OpenSSH Authentication Agent
in the list and double click on it; - In the
OpenSSH Authentication Agent Properties
window that appears, chooseAutomatic
from theStartup type:
dropdown and clickStart
fromService status:
. Make sure it now saysService status: Running
.
- Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
NewerOlder