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
| #!/bin/bash | |
| # Claude Code Multi-Account Switcher | |
| # Usage: ./claude-switch-multi.sh [account1|account2|account3|save-current|list|status] | |
| CLAUDE_DIR="$HOME/.claude" |
| ~ | |
| (?(DEFINE) | |
| (?<entity> | |
| & | |
| ( | |
| [a-z][a-z0-9]+ # named entity | |
| | | |
| \#\d+ # decimal number | |
| | |
| <?php | |
| // INTERFACES | |
| interface WriterFactory | |
| { | |
| public function createCsvWriter(): CsvWriter; | |
| public function createJsonWriter(): JsonWriter; | |
| } | |
| <?php | |
| // https://www.youtube.com/watch?v=M3_xnTK6-pA?t=44m18s | |
| // http://eddmann.com/posts/implementing-and-using-memoization-in-php/ | |
| //$memoize = function ($function) { | |
| function memoize($function) { | |
| return function () use ($function) { | |
| static $cache = []; | |
| $args = func_get_args(); | |
| $key = md5(serialize($args)); | |
| if (empty($cache[$key])) { |
http://www.xminder.com/number.check.php?number=5551234567
http://www.xminder.com/number.check.php?number=<10digitnumber>
'nuff said
Also, npm module for node.js:
| var FormRepo = function (namespace) { | |
| /// <summary>Persistent form values, saves to localStorage</summary> | |
| /// <param name="namespace" type="String">the namespace to store values in localStorage</param> | |
| // should also protect per page, since we could have the same forms in various places | |
| this.N = namespace + '.' + window.location.pathname; | |
| }; | |
| $.extend(FormRepo.prototype, { | |
| namespace: function (key) { | |
| return this.N + '.' + key; |
| <?php | |
| /* | |
| ErrorHandler Class | |
| By James King | |
| v0.1 Alpha | |
| WARNING: This class is still in ALPHA phase. Not recommended for production. | |
| Manages and handles any PHP errors found in your script. |
| <?php | |
| /** | |
| * Namespace Migration Script | |
| * | |
| * @author Rasmus Schultz <[email protected]> | |
| * @license http://www.gnu.org/licenses/gpl-3.0.txt | |
| * | |
| * This script will scan through an entire PHP codebase and rewrite the | |
| * scripts, adding a namespace clause based on the directory structure, |