Home Interests Unix

Using the iTerm 2 and tmux integration

howchoo
howchoo   (436)
August 22, 2023
5 minutes

Share

Interests
Posted in these interests:
linux • 12 guides
tmux • 1 guides
unix • 2 guides

For a few years now, I’ve been using iTerm 2 and tmux. But only recently did I find out about a pretty important feature of iTerm: tmux integration. I found out because I was getting tired of tmux as a window manager and started looking for alternatives.

The tmux integration basically means that you use iTerm 2 as you normally would for window management, except it uses tmux on the backend for multiplexing.

tl;dr

tmux -CC
tmux -CC attach

1 – Install tmux and iTerm2

You can download iTerm 2 from the website.

tmux must be installed on whichever machine you plan to use it.

On OS X:

brew install tmux

Debian/Ubuntu:

apt-get install tmux

2 – Start new tmux session using -CC option

Using iTerm 2, log into the machine you want to work with. This can be your local machine or a remote server over ssh. Start a new tmux session using the -CC option.

tmux -CC

You will see a message saying tmux mode started with a Command Menu.

3 – Open new tabs and windows

With this setup iTerm is your window manager. So if you’re going to open new tabs, split panes, or open new windows you do so using all of the shortcuts you may be familiar with:

cmd + t: open a new tab cmd + n: open a new window cmd + d: split vertically cmd + shift + d: split horizontally

You can choose whether you want to do this using the same profile or not. If you choose to use the same profile, iTerm will use tmux to create virtual windows.

4 – Detaching tmux

When you’re done working and you’re ready to detach you can simply close the tab or window. iTerm will ask you whether you want to detach tmux or kill the windows. Clicking Detach tmux Session will cleanly detach and allow you to re-attach in the future.

5 – Attach to an existing tmux session

If you’ve got a tmux session already running and you want to attach, simply use:

tmux -CC attach
NEXT UP

How to Install SSHFS

howchoo
howchoo   (436)
September 29, 2023

This guide will show you how to install SSHFS on various operating systems. 1 – On macOS Using brew, install FUSE. Now install SSHFS: 2 – On Ubuntu/Debian 3 – On Windows Find the desired version of win-sshfs from this page and download it.

Continue Reading
Home Interests OctoPrint

How to Update OctoPrint

howchoo
howchoo   (467)
August 22, 2023
4 minutes

Share

Interests
Series
Posted in these interests:
3dprinting • 36 guides
octoprint • 10 guides

This short guide will show you how to update or upgrade OctoPrint and OctoPi on your Raspberry Pi. Updating is important to keep your setup running smoothly. Updates generally include bug fixes, security patches, and new features.

This process is actually super easy and largely automated.

1 – Back up your SD card

As with any update process, it’s recommended that you back up your Raspberry Pi just in case. Fortunately, we have a guide for that!

How to Back Up a Raspberry Pi SD Card in Windows
Create a Pi backup using Windows.

How to Back Up and Restore Your Raspberry Pi SD Card on Mac
Easily backup, restore, or clone your SD card!

2 – Check for updates

Open the OctoPrint interface in your browser, as you normally would. If there’s an update available, a modal will appear automatically.

3 – Perform the update

Click Update now to begin the update process. Then, click Proceed to confirm.

🛈 Do not disconnect the Pi or close your web browser until the update process is complete.

4 – Reload your browser

OctoPrint will prompt you when it’s time to reload your browser. If you run into any issues, simply restore your SD card backup using an application such as Etcher.

You’re all done!

NEXT UP

How to Update Blender

Get the latest Blender has to offer.
howchoo   (467)
November 24, 2023

Blender is one of the most popular open-source 3D creation suites today. It doesn’t cost a dime to use and everything you create is yours to own for good. The community is robust and the dev team still releases new updates on the regular. If you want to get the latest version, you may have

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Home Interests MacOS

How to Change Your Mac Computer’s Bluetooth Name

howchoo
howchoo   (467)
August 22, 2023
3 minutes

Share

Interests
Posted in these interests:
 
apple • 18 guides
osx • 6 guides
macos • 20 guides

I have a pair of wireless bluetooth headphones that states the name of the device it’s connecting to — and with a long or unrecognizable name, this is quite annoying.

This short guide will teach you how to change your computer’s bluetooth name in MacOS and OS X.

1 – Open System Preferences

Navigate to Apple Icon > System Preferences.

2 – Access Sharing Preferences

Click the Sharing icon.

3 – Change your Mac’s Computer Name

In the Computer Name field, enter the new name you’d like to use. Your Mac’s Computer Name is also its bluetooth name, as well as its network sharing name. Change this to whatever you’d like you computer’s new bluetooth device name to be. The name is saved immediately after changing it — there is no save button. 🙂

4 – Renaming other bluetooth devices/accessories in MacOS and OS X

You can also change the name of your bluetooth devices themselves (headphones, etc.) To do this. return to system preferences, click the Bluetooth icon, right click a device and select Rename.

NEXT UP

How to Enable the “Popping” Sound When Adjusting the Volume on Your Mac

howchoo
howchoo   (467)
December 13, 2023

Starting with MacOS Sierra and High Sierra, your Mac will no longer play a “pop” sound when you adjust your volume. If you prefer to have this sound when you adjust volume up and down (as I do), this guide will teach you how to reenable it. 1 – Open Sound System Preferences Navigate to System

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Home Interests MacOS

How to Double-Click the Title Bar to Minimize an Application on Mac

howchoo
howchoo   (467)
August 22, 2023
1 minutes

Share

Interests
Posted in these interests:

Mac

mac • 24 guides
osx • 6 guides
macos • 20 guides

Want to minimize an application by double-clicking its title bar? Here’s how to do it.

1 – Open Dock in System Preferences

Navigate to System Preferences > Dock.

2 – Change the title bar behavior

Select the checkbox next to “Double-click a window’s title bar to..” and select “minimize” as the option in its dropdown.

Did you know you can also minimize applications in macOS by double-clicking the menu bar? Check out our guide to see how it’s done.

NEXT UP

How to Enable the “Popping” Sound When Adjusting the Volume on Your Mac

howchoo
howchoo   (467)
December 13, 2023

Starting with MacOS Sierra and High Sierra, your Mac will no longer play a “pop” sound when you adjust your volume. If you prefer to have this sound when you adjust volume up and down (as I do), this guide will teach you how to reenable it. 1 – Open Sound System Preferences Navigate to System

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Home Interests Unix

Using the iTerm 2 and tmux integration

howchoo
howchoo (467)
August 22, 2023
5 minutes

Share

Interests
Posted in these interests:
linux • 12 guides
tmux • 1 guides
unix • 2 guides
For a few years now, I’ve been using iTerm 2 and tmux. But only recently did I find out about a pretty important feature of iTerm: tmux integration. I found out because I was getting tired of tmux as a window manager and started looking for alternatives. The tmux integration basically means that you use iTerm 2 as you normally would for window management, except it uses tmux on the backend for multiplexing. tl;dr
tmux -CC
tmux -CC attach

1 – Install tmux and iTerm2

You can download iTerm 2 from the website. tmux must be installed on whichever machine you plan to use it. On OS X:
brew install tmux
Debian/Ubuntu:
apt-get install tmux

2 – Start new tmux session using -CC option

Using iTerm 2, log into the machine you want to work with. This can be your local machine or a remote server over ssh. Start a new tmux session using the -CC option.
tmux -CC
You will see a message saying tmux mode started with a Command Menu.

3 – Open new tabs and windows

With this setup iTerm is your window manager. So if you’re going to open new tabs, split panes, or open new windows you do so using all of the shortcuts you may be familiar with: cmd + t: open a new tab cmd + n: open a new window cmd + d: split vertically cmd + shift + d: split horizontally You can choose whether you want to do this using the same profile or not. If you choose to use the same profile, iTerm will use tmux to create virtual windows.

4 – Detaching tmux

When you’re done working and you’re ready to detach you can simply close the tab or window. iTerm will ask you whether you want to detach tmux or kill the windows. Clicking Detach tmux Session will cleanly detach and allow you to re-attach in the future.

5 – Attach to an existing tmux session

If you’ve got a tmux session already running and you want to attach, simply use:
tmux -CC attach
NEXT UP

How to Install SSHFS

howchoo
howchoo (467)
September 29, 2023
This guide will show you how to install SSHFS on various operating systems. 1 – On macOS Using brew, install FUSE. Now install SSHFS: 2 – On Ubuntu/Debian 3 – On Windows Find the desired version of win-sshfs from this page and download it.
Continue Reading

howchoo

 467 guides
Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.
Home Interests Roomba

How to Replace the Filter on Your Roomba i7

howchoo   (467)
August 22, 2023
4 minutes

Share

You’ll Need 2

What you’ll need
Interests
Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.
Posted in these interests:
robotvacuum • 4 guides
roomba • 3 guides

Your Roomba i7 vacuum filter will need to be cleaned every few weeks and replaced every two months. This short guide will show you how to remove and replace (or clean) your Roomba vacuum filter.

1 – Remove the dust bin

To remove the dust bin, simply push the tab at the side of the bin. Pushing the tab will pop the dust bin out, and it can be easily removed.

2 – Remove the old filter

You can remove the filter by pulling it straight out from the dust bin. Hold on to the dust bin one hand, and grab the edges of the filter with your other.

3 – Clean the filter and reuse it (optional)

You don’t need to replace the filter every time it gets dirty. In fact, you’ll want to clean the filter every week or so. At this point, you can clean the filter if you choose. To begin, tap the filter against the side of your garbage can to shake loose the dirt and debris. If you’d like, you can also spray the filter with compressed air or vacuum it to remove more of the dust.

4 – Put the new filter in place

Push the new (or cleaned) filter back in to the dust bin securely.

5 – Put the dust bin back in place

To put the dust bin back in place, start by place the hook into the opening. If the hook is in place properly, it acts as a hinge. Then, you can push the other side of the dust bin and lock it into place.

With the dust bin back in place, your Roomba i7 is ready for action! Next, learn how to unclog the Roomba i7 Clean Base.

NEXT UP

How to Replace the Edge-Sweeping Brush on Your Roomba i7

howchoo   (467)
November 20, 2023

Your Edge-Sweeping Brush needs to be replaced about once a year. Use this guide to learn how to replace the Edge-Sweeping Brush on your Roomba i7. What is the Edge-Sweeping Brush? The Edge-Sweeping Brush is the spinning brush on the right side of the robot. The Roomba uses this brush to clean around the edges

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Home Interests Docker

How to Remove Orphaned Volumes in Docker

howchoo   (467)
August 22, 2023
3 minutes

Share

Interests
Posted in these interests:
docker • 4 guides

When using Docker sometimes it’s necessary to do some cleanup in order to free up space. I ran into an issue recently where I could not start my database container. The error message was:

db_1     | creating subdirectories ... initdb: could not create directory "/var/lib/postgresql/data/global": No space left on device

One simple way to free up space is to delete dangling or orphaned volumes. A dangling volume is a volume that is not referenced by any container.

1 – docker volume rm $(docker volume ls -qf dangling=true)

Let’s break this down.

First, if you want to see a list of the dangling volumes you can simply run:

docker volume ls -qf dangling=true

docker volume ls lists the volumes and -qf means list only the ids and filter on dangling=true.

To delete these volumes we’ll pass them in to the docker volume rm function which takes a volume id or list of ids. The final command is:

docker volume rm $(docker volume ls -qf dangling=true)
NEXT UP

How to Run a Raspberry Pi Cluster with Docker Swarm

An in-depth Raspberry Pi cluster example.
howchoo   (467)
September 20, 2023

A cluster is a group of computers performing the same task, operating as a single system. Although Raspberry Pi’s are pretty incredible devices, a single Pi can only do so much. A Raspberry Pi cluster can be used anytime you want to improve performance or availability, and there are many use cases including serving web

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Home Interests Verizon

Check Your Verizon Wireless Account Balance via Text

howchoo (467)
August 22, 2023
1 minutes

Share

Interests
Series
Posted in these interests:
verizon • 6 guides
wireless • 6 guides

1 – Dial #BAL (#225) and press the Call button

Listen until an automated voice answers the call. Then you can hang up.

2 – Check your text messages

A text message with your account balance will appear soon.
NEXT UP

How to Enable Verizon Call Forwarding

Direct your calls elsewhere.
howchoo (467)
December 1, 2023
Call forwarding is the process of directing phone calls from one number to another. Verizon allows its customers to enable call forwarding at no additional charge. Your typical call rates will still apply. This process works for all Verizon customers regardless of your carrier—including Samsung, Apple, LG, Lenovo, and more. Note: International numbers can not
Continue Reading

howchoo

 467 guides
Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.
Home Interests Internet

Xfinity Login: How to log in to your Xfinity account

howchoo
howchoo   (467)
August 18, 2023
2 minutes

Share

Interests
Posted in these interests:
comcast • 7 guides
internet • 36 guides

This guide will provide instructions for getting logged in to your Comcast Xfinity account.

1 – Login page

If you know your username and password, you simply head over to the Xfinity login page on the Xfinity website to log in.

2 – Recover username or password

If you’ve lost your username or password, there’s hope.

Username

If you’ve lost your username, head to the account lookup page.

Password

If you’ve lost your password, you’ll need to reset it. You can do that on the password reset page.

3 – Create an account

If you don’t have an account, you can create one here.

4 – Contact support

At this point, if you can’t get logged in, contact support:

1 (800) 934-6489

NEXT UP

How to Change Your Frontier WiFi Password

howchoo
howchoo   (467)
November 25, 2023

There are a few reasons you might want to update or reset your WiFi password: making your network more secure, and making your password easier to remember and type. Improved network security You can add an extra layer of security to your network by changing the WiFi password. As long as your new password is

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Home Interests Python

Nested defaultdicts in Python

howchoo
howchoo   (467)
August 18, 2023
8 minutes

Share

Interests
Posted in these interests:
code • 11 guides
python • 18 guides

While this requirement may seem rare, learning how to nest defaultdicts properly in Python can be extremely powerful and save you from bloated and confusing initialization code.

In this guide we’ll cover:

  • What are nested dictionaries?
  • What is a defaultdict, and when is it used?
  • How can we create multi-level defaultdicts (or nested defaultdicts)?

If you’re already familiar with these concepts, feel free to skip ahead to step three.

We highly recommend you also read and learn about Python dictionary comprehension as well, after reviewing this guide.

1 – What is a nested dictionary?

In Python, a dictionary is a key-value map, and the value can contain any type. You can merge dictionaries and in this case, even nest them. A “nested” dictionary simply refers to a dictionary whose values are also dictionaries, and this pattern could be used for multiple levels.

Merge Dictionaries in Python

See the following example:

level_one = {
    'level_two': {
        'level_three': {
            'some_key': 'some_value' 
        }
    }
}

To access values in the terminal dictionary, you could use the following:

level_one['level_two']['level_three']['some_key']

2 – What is a defaultdict?

defaultdict is a dictionary with some added functionality. The defaultdict allows us to specify a default type to return if a key doesn’t exist.

Typically, if you try to access a non-existent key in a dictionary, it will raise a KeyError. But sometimes, rather than raising an exception, we may want to return a default value instead. There are a few ways to accomplish this, but one powerful tool is the defaultdict. See the following:

from collections import defaultdict

my_dict = defaultdict(int)

We’ve instantiated a defaultdict and set the default type to int. This means if we try to access a key in my_dict that doesn’t exist, it will return the value of int() (which is 0).

This is very powerful for a few reasons!

It always returns a value
my_dict['tyler'] = 34

print(my_dict['tyler'])
# => 34

print(my_dict['nikki'])
# => 0
We can operate on any key without initializing it

What is even more valuable is that we can operate on keys without initializing them. Imagine we want to use a dictionary to keep track of players’ scores.

scores = defaultdict(int)

# Tyler scores one point
scores['tyler'] += 1

# Nikki scores two points
scores['nikki'] += 2

The code is much more concise. With a standard dictionary, we’d have to check if the key exists and initialize the values up front.

3 – Nested defaultdicts

Now that we understand nested dictionaries and defaultdicts, we can get into nested defaultdicts.

This is concept is extremely powerful as it allows you to build complex dictionaries with a simple initialization. The only caveat is that you need to know the depth of your data structure in advance. Also, you need to know the default type of the terminal values.

If you’re wondering how this concept will be useful, think about a situation where you’d want to use a defaultdict but you actually want the default type to be defaultdict.

The first thing we have to do is define our dictionary:

from collections import defaultdict

my_dict = defaultdict(lambda: defaultdict(dict))

Notice that we have to use a lambda function as the argument to the first defaultdict. This is because defaultdict expects a callable (or None).

If necessary, we could take this concept as far as we need:

my_dict = defaultdict(lambda: defaultdict(lambda: defaultdict(dict)))

Now, using our original example, we can easily populate our data structure without having to initialize each value.

my_dict['dogs']['rover']['bathed'] = True
my_dict['dogs']['rover']['fed'] = False
my_dict['cats']['sam']['fed'] = True
NEXT UP

Secure Your Sensitive Data with Kubernetes Secrets

Learn how to create and use Kubernetes secrets.
howchoo   (467)
November 26, 2023

Kubernetes secrets are objects that store and manage sensitive data inside your Kubernetes cluster. One mistake developers often make is storing sensitive information like database passwords, API credentials, etc in a settings file in their codebase. This is very bad practice (hopefully for obvious reasons). Most developers know this, but still choose the option because it’s easy.

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo’s writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.