Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories.
- Create Separate Config Directories
mkdir ~/.claude-account1 mkdir ~/.claude-account2
| public class Test extends Activity { | |
| ... | |
| public String getRedirectUrl(String url) { | |
| URL urlTmp = null; | |
| String redUrl = null; | |
| HttpURLConnection connection = null; | |
| try { | |
| urlTmp = new URL(url); |
| package utils; | |
| import java.util.*; | |
| public class NlpUtils { | |
| static Map<String, String> dictChar; | |
| static Character[][] vowelTable = { | |
| {'a', 'à', 'á', 'ả', 'ã', 'ạ'}, | |
| {'ă', 'ằ', 'ắ', 'ẳ', 'ẵ', 'ặ'}, |
| function nonAccentVietnamese(str) { | |
| str = str.toLowerCase(); | |
| // We can also use this instead of from line 11 to line 17 | |
| // str = str.replace(/\u00E0|\u00E1|\u1EA1|\u1EA3|\u00E3|\u00E2|\u1EA7|\u1EA5|\u1EAD|\u1EA9|\u1EAB|\u0103|\u1EB1|\u1EAF|\u1EB7|\u1EB3|\u1EB5/g, "a"); | |
| // str = str.replace(/\u00E8|\u00E9|\u1EB9|\u1EBB|\u1EBD|\u00EA|\u1EC1|\u1EBF|\u1EC7|\u1EC3|\u1EC5/g, "e"); | |
| // str = str.replace(/\u00EC|\u00ED|\u1ECB|\u1EC9|\u0129/g, "i"); | |
| // str = str.replace(/\u00F2|\u00F3|\u1ECD|\u1ECF|\u00F5|\u00F4|\u1ED3|\u1ED1|\u1ED9|\u1ED5|\u1ED7|\u01A1|\u1EDD|\u1EDB|\u1EE3|\u1EDF|\u1EE1/g, "o"); | |
| // str = str.replace(/\u00F9|\u00FA|\u1EE5|\u1EE7|\u0169|\u01B0|\u1EEB|\u1EE9|\u1EF1|\u1EED|\u1EEF/g, "u"); | |
| // str = str.replace(/\u1EF3|\u00FD|\u1EF5|\u1EF7|\u1EF9/g, "y"); | |
| // str = str.replace(/\u0111/g, "d"); |
| /** | |
| * Simulate a key event. | |
| * @param {Number} keyCode The keyCode of the key to simulate | |
| * @param {String} type (optional) The type of event : down, up or press. The default is down | |
| * @param {Object} modifiers (optional) An object which contains modifiers keys { ctrlKey: true, altKey: false, ...} | |
| */ | |
| function simulateKey (keyCode, type, modifiers) { | |
| var evtName = (typeof(type) === "string") ? "key" + type : "keydown"; | |
| var modifier = (typeof(modifiers) === "object") ? modifier : {}; |
PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.
Here's how I combine the two, to create docs with embedded diagrams.
Get the command-line PlantUML from the download page or your relevant package manager.
rsync (Everyone seems to like -z, but it is much slower for me)
| #!/usr/bin/env bash | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt update | |
| sudo update-alternatives --remove-all gcc | |
| sudo update-alternatives --remove-all g++ | |
| sudo apt-get install -y gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 gcc-5 g++-5 gcc-6 g++-6 gcc-7 g++-7 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 |
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: openconnect | |
| # Required-Start: $local_fs $remote_fs $network | |
| # Required-Stop: $local_fs $remote_fs $network | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Basic script to connect to a SSL VPN using Openconnect | |
| ### END INIT INFO |