2025-08-22 05:59:02
Creating a new Git repository is a common task for developers. While you can always do this from the web interface of GitHub or GitLab, using command-line tools can significantly speed up your workflow, especially when you're already working in the terminal. In this post, we'll explore how to use gh
for GitHub and glab
for GitLab to create a remote repository and push your local project to it.
gh
to Create a GitHub RepositoryThe gh
command is the official GitHub CLI tool. If you don't have it installed, you can follow the installation instructions on the official website.
Once installed and authenticated, you can create a new repository with the following command:
gh repo create
This command will start an interactive prompt, asking for the repository name, visibility (public, private, or internal), and whether you want to clone it or push an existing local repository.
To create a repository and push your current local folder, you can run:
gh repo create <repo-name> --public --source=. --remote=origin
git push -u origin main
Replace <repo-name>
with your desired repository name. The --source=.
flag tells gh
to use the current directory as the source, and --remote=origin
sets the remote name.
glab
to Create a GitLab RepositoryFor GitLab users, glab
is the official CLI tool. You can find installation instructions on its official documentation.
After installation and authentication, creating a new repository is just as simple.
To create a new repository interactively, run:
glab repo create
This will guide you through the process of naming your repository and setting its visibility.
To create a repository and push your current local project, you can use:
# Official gitlab
glab repo create <your-namespace>/<repo-name> --public
# Private host gitlab
glab repo create <your-private-host>/<your-namespace>/<repo-name> --private
# Add remote and push
git remote add origin "https://<host>/<your-username>/<repo-name>.git"
git push -u origin main
Replace <repo-name>
and <your-username>
accordingly. glab
will create the remote repository, and then you can add it as a remote and push your code.
Using command-line tools like gh
and glab
can make your development workflow more efficient. With just a few commands, you can initialize a local repository, create a remote one, and push your code without ever leaving the terminal.
2025-08-19 19:06:29
Good diagrams compress complex ideas into shapes, arrows, and frames the way code compresses logic. When diagrams are generated from code, they can be versioned, reviewed, and kept in sync with the system. This post compares six popular options and shows minimal working examples so you can pick the right tool for your team and workflow.
Think about three things: where the diagram will live, how often it will change, and who must edit it. If you want diagrams embedded in docs and PRs, a text-first format like Mermaid or PlantUML works well. If you prefer diagrams sourced from real code, Diagrams (Python) or Go Diagrams integrate with your language toolchain. For quick sketches, ASCII is frictionless. For brainstorming and note-taking, Markmap turns Markdown into interactive mind maps.
Diagrams is a Python library that renders architecture diagrams from code. It excels at cloud/system architecture where you want provider icons, clusters, and consistent styling. Because it is Python, you can compose generators, reuse components, and test the code that produces your diagram.
# pip install diagrams
from diagrams import Diagram, Cluster
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
with Diagram("web-service", show=False):
with Cluster("App Tier"):
app = [EC2("app1"), EC2("app2")]
db = RDS("primary-db")
lb = ELB("edge")
lb >> app >> db
Use it when you need repeatable, code-reviewed architecture diagrams with cloud icons and when Python is already in your stack.
Go Diagrams follows a similar idea for the Go ecosystem. It lets you define nodes and edges in Go, then renders to SVG/PNG. Its strengths are type safety, simple composition, and a natural fit for Go services where developers prefer staying in one language.
package main
func main() {
// Pseudocode-style example to convey intent
g := NewDiagram("payments")
api := g.Node("API")
svc := g.Node("Service")
db := g.Node("DB")
api.Connect(svc)
svc.Connect(db)
g.Render("payments.svg")
}
Pick it if your team writes Go and wants diagrams generated within the same toolchain, for CI-friendly outputs and code reviews.
Mermaid renders diagrams from a concise Markdown-like syntax, supported by many platforms (including GitHub, GitLab, and numerous docs tools). It is ideal for documentation-driven teams because diagrams live beside prose and update via simple edits.
flowchart TD
A[Client] --> B[API Gateway]
B --> C{Auth?}
C -- yes --> D[Service]
C -- no --> E[401]
D --> F[(DB)]
Use Mermaid for architectural sketches, flows, and sequence diagrams directly in Markdown files, wikis, and PR descriptions.
PlantUML is a mature, text-based system supporting many diagram types: sequence, component, class, state, and more. It provides powerful styling, includes, and skinparams for large documentation codebases.
@startuml
actor User
participant "Web App" as Web
database DB
User -> Web: POST /login
Web -> DB: query credentials
DB --> Web: result
Web --> User: 200 OK
@enduml
Choose PlantUML when you need breadth of diagram types, fine-grained styling, and modular includes across a large doc set.
ASCII diagrams are plain text drawings you can create in any editor and keep in code blocks. They render everywhere, diff cleanly, and require no toolchain. They are perfect for quick design notes, README snippets, and terminal-first workflows.
+---------+ +----------+ +--------+
| Client | ---> | Proxy | ---> | API |
+---------+ +----------+ +--------+
| |
v v
Cache Database
Reach for ASCII when you value speed, universality, and zero dependencies over polish.
Markmap converts Markdown lists into interactive mind maps. It is excellent for brainstorming, note-taking, and structuring research. Because the source is Markdown, it works well with existing docs and knowledge bases.
# Project Kickoff
- Scope
- MVP
- Out of scope
- Architecture
- Services
- Data flow
- Risks
- Scaling
- Compliance
Use Markmap to ideate and present hierarchies during early phases, then evolve those notes into formal docs.
If you want code-native, icon-rich architecture diagrams that stay in sync with cloud resources, prefer Diagrams (Python) or Go Diagrams depending on your language. If you need frictionless diagrams in docs and PRs with broad platform support, pick Mermaid. If you require advanced diagram types, skinning, and modularization, choose PlantUML. For fast, dependency-free sketches, use ASCII. For early-stage thinking and presentations built from notes, adopt Markmap.
Keep diagram sources in the same repo as the system they describe so changes travel with code. Add a CI step to render and validate diagrams to prevent drift. Create reusable templates for common topologies and enforce naming and styling conventions. For mixed environments, standardize on a text-first format like Mermaid or PlantUML for documentation and complement it with language-native generators (Diagrams or Go Diagrams) for architecture that benefits from code reuse.
Treat diagrams as living artifacts rather than static images. When they are generated from code or text, they become reviewable, testable, and easy to evolve. Pick one primary format for your team and add others only when they clearly reduce friction or improve clarity.
2025-08-09 23:07:37
Need quick access to your terminal? iTerm2 offers a seamless way to summon it with a system‑wide hotkey—just like a drop‑down terminal. Here's how to set it up.
This creates a dedicated, always-accessible, overlay-style terminal window—ideal for quick access.
Now, pressing your chosen hotkey will toggle this profile in a dedicated window—without creating a new one.
Method | Steps | Pros |
---|---|---|
Dedicated Hotkey Window | Preferences → Keys → Create Dedicated Hotkey Window → Configure options | Fast setup, always-available overlay |
Existing Profile | Preferences → Profiles → (Profile) → Keys → Enable hotkey window → Configure hotkey | Reuses your customized profile and settings |
Both approaches work well—choose whichever fits your workflow:
With your hotkey set, your terminal is gone—until you need it again.
2025-08-04 06:51:42
The four-part "Rebuild of Evangelion" film series, known in Japan as 『ヱヴァンゲリヲン新劇場版』 (Evangelion: New Theatrical Edition) for the first three installments and concluding with 『シン・エヴァンゲリオン劇場版』 (Evangelion: 3.0+1.0 Thrice Upon a Time), intentionally deviates from a unified naming convention. This lack of uniformity is not an oversight but a deliberate creative choice by director Hideaki Anno, reflecting the evolving narrative structure and thematic depth of the series. The distinct titles mirror a progression from a cyclical, traditional storytelling form to a definitive, multifaceted conclusion.
The first three films, 『ヱヴァンゲリヲン新劇場版:序』 (Evangelion: 1.0 You Are (Not) Alone.), 『:破』 (Evangelion: 2.0 You Can (Not) Advance.), and 『:Q』 (Evangelion: 3.0 You Can (Not) Redo.), follow the "Jo-ha-kyū" (序破急) structure, a concept rooted in traditional Japanese aesthetics and dramatic arts. This tripartite form, translating to "beginning, break, and rapid," dictates a slow introduction, a development and departure from the established pace, and a climactic, hurried conclusion.
序 (Jo - Prelude): The first film serves as the introduction, largely re-presenting the initial episodes of the original television series, setting the stage and introducing the main characters and conflicts.
破 (Ha - Break): The second film significantly diverges from the original narrative, "breaking" from the established storyline and introducing new characters and plot developments, escalating the conflict and the emotional stakes.
Q (Kyū - Quickening/Question): The third film's title is a clever play on words. "Kyū" (急) signifies the "rapid" or climactic phase of the "Jo-ha-kyū" structure. However, the use of the English letter "Q" also evokes the sense of a "question," reflecting the film's disorienting time skip and the bewildering circumstances the protagonist, Shinji Ikari, finds himself in.
This adherence to a traditional narrative structure in the first three titles creates a sense of a familiar, albeit remixed, story. However, the titling of the final film, 『シン・エヴァンゲリオン劇場版』 (Evangelion: 3.0+1.0 Thrice Upon a Time), signals a definitive break from this cycle.
The use of "シン" (Shin) in katakana is a key element. This allows for multiple interpretations, all of which are relevant to the film's themes:
The English subtitle, "Thrice Upon a Time," further emphasizes the theme of repetition and finality. It acknowledges the previous tellings of the Evangelion story (the original series, "The End of Evangelion," and now the "Rebuild" series) and asserts this as the third and final iteration. The numbering, "3.0+1.0," signifies that this film is not simply "4.0" but a continuation and conclusion of the "Q" (3.0) storyline, while also being a new "1.0," a new beginning.
Furthermore, a subtle but significant stylistic choice in the Japanese titles underscores this shift. The first three films use the archaic katakana "ヲ" (wo) in "Evangelion" (ヱヴァンゲリヲン), while the final film reverts to the modern "オ" (o) (エヴァンゲリオン). This can be interpreted as a move from a repeated, somewhat altered past to a new, contemporary present and future.
In conclusion, the non-unified titles of the "Rebuild of Evangelion" films are a crucial element of their storytelling. They guide the audience through a deliberate narrative progression: from the familiar, cyclical structure of "Jo-ha-kyū" to a multifaceted and definitive "Shin" conclusion that breaks the cycle and offers a new, final word on the epic saga.
This video delves into some of the reasons why the Rebuild of Evangelion series was created in the first place, offering context to the creative decisions behind the films. A Deeper Look at the Rebuild of Evangelion
2025-07-30 23:41:50
Earnings calls and financial reports are crucial for investors and analysts to assess a company's performance. Here’s where you can find the latest earnings calls and reports for major tech companies:
Company | Primary Website |
---|---|
Alphabet/Google | abc.xyz/investor |
NVIDIA | investor.nvidia.com |
Amazon | ir.aboutamazon.com |
Microsoft | microsoft.com/investor |
Meta/Facebook | investor.atmeta.com |
Tesla | ir.tesla.com |
Apple | investor.apple.com |
2025-07-10 01:41:43
If you're using ComfyUI on a Mac to create awesome AI images, you might have hit a wall when trying to make them really big. Specifically, if you try to generate an image larger than 1920x1920 pixels, you've probably seen your process crash right at the end with a weird error message.
It's a frustrating problem, but don't worry, there's a simple fix!
When ComfyUI is almost done generating your large image, it suddenly stops and you see an error message in your terminal that looks something like this:
/AppleInternal/Library/BuildRoots/.../MPSNDArray.mm:829: failed assertion \`... Error: NDArray dimension length \> INT\_MAX'
In simple terms, this is a bug in a recent version of PyTorch, the library ComfyUI uses for its AI magic on Apple Silicon (M1, M2, M3 chips). The part of PyTorch that handles image data on the Mac's graphics chip (Metal Performance Shaders or MPS) can't handle the dimensions of your super-sized image.
The good news is you can fix this by going back to a slightly older, more stable version of PyTorch. The key is to install version 2.4.1.
Here's how to do it:
pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1
This command tells Python's package manager, pip
, to uninstall your current PyTorch and install the specific versions that are known to work without this bug.
After the installation is complete, restart ComfyUI, and you should now be able to generate those huge images without any crashes. 🎉
I've personally tested this fix on an M1 Max with 64GB of RAM, successfully generating 3000x3000 pixel images without any crashes. Before the PyTorch downgrade, ComfyUI would consistently crash when attempting to generate images at this resolution. After installing PyTorch 2.4.1, the same workflows completed successfully.
This bug is related to specific versions of PyTorch. If you need to find other previous versions for any reason, the official PyTorch website has a helpful archive.
For those interested in the technical details, you can follow the bug reports on GitHub:
Happy generating!