Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.
| // Run any SwiftUI view as a Mac app. | |
| import Cocoa | |
| import SwiftUI | |
| NSApplication.shared.run { | |
| VStack { | |
| Text("Hello, World") | |
| .padding() | |
| .background(Capsule().fill(Color.blue)) |
| # gtr ─ Git worktree helper | |
| # | |
| # Examples | |
| # -------- | |
| # gtr create feature0 # add ~/code/worktrees/feature0 (branch claude/feature0) | |
| # gtr create feat1 feat2 # add two worktrees at once | |
| # gtr rm feature0 # remove the worktree directory | |
| # gtr cd feature0 # jump into the worktree directory | |
| # gtr claude feature0 # run `claude` while inside that worktree | |
| # |
| #!/usr/bin/env zsh | |
| # Multi-project worktree manager with Claude support | |
| # | |
| # ASSUMPTIONS & SETUP: | |
| # - Your git projects live in: ~/projects/ | |
| # - Worktrees will be created in: ~/projects/worktrees/<project>/<branch> | |
| # - New branches will be named: <your-username>/<feature-name> | |
| # | |
| # DIRECTORY STRUCTURE EXAMPLE: | |
| # ~/projects/ |
| require 'socket' | |
| require 'rack' | |
| require 'rack/lobster' | |
| app = Rack::Lobster.new | |
| server = TCPServer.new 5678 | |
| while session = server.accept | |
| request = session.gets | |
| puts request |
| /** | |
| * | |
| * Base64 encode / decode | |
| * http://www.webtoolkit.info/ | |
| * | |
| **/ | |
| var Base64 = { | |
| // private property |
Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| # My take on Mike's source_for method. | |
| # (see http://pragmaticstudio.com/blog/2013/2/13/view-source-ruby-methods) | |
| # | |
| # (1) I named it 'src' rather than source_for (ok, I'm a lazy typer). | |
| # (2) The edit function was broken out as a separate function. | |
| # (3) The edit function is for emacs | |
| # (4) If the method is not defined on the object, and the object | |
| # is a class, then see if it is an instance method on the class. | |
| # | |
| # The fourth point allows my to say: |
| import hashlib, struct, codecs | |
| ver = 2 | |
| prev_block = "000000000000000117c80378b8da0e33559b5997f2ad55e2f7d18ec1975b9717" | |
| mrkl_root = "871714dcbae6c8193a2bb9b2a69fe1c0440399f38d94b3a0f1b447275a29978a" | |
| time_ = 0x53058b35 # 2014-02-20 04:57:25 | |
| bits = 0x19015f53 | |
| # https://en.bitcoin.it/wiki/Difficulty | |
| exp = bits >> 24 |
| import hashlib, struct | |
| ver = 2 | |
| prev_block = "000000000000000117c80378b8da0e33559b5997f2ad55e2f7d18ec1975b9717" | |
| mrkl_root = "871714dcbae6c8193a2bb9b2a69fe1c0440399f38d94b3a0f1b447275a29978a" | |
| time_ = 0x53058b35 # 2014-02-20 04:57:25 | |
| bits = 0x19015f53 | |
| # https://en.bitcoin.it/wiki/Difficulty | |
| exp = bits >> 24 |