Skip to content

Instantly share code, notes, and snippets.

View bdlangton's full-sized avatar

Barrett Langton bdlangton

View GitHub Profile
@bdlangton
bdlangton / tmux.md
Last active May 1, 2024 12:09
Tmux Commands

NOTE: All commands that start with tmux can be executed within a tmux session by typing prefix, followed by :, then type the rest of the command (after tmux).

There is a binary script called tat that can be run and it will create a new session named after the directory that you are currently in. If a session with that name already exists, it will just open that session.

Sessions

Command Description
tmux new -s [session name] Start new named session
prefix s Choose a different session using fzf (custom mapping)
@bdlangton
bdlangton / Sitemap.php
Created September 4, 2019 23:02
Sitemap of sitemaps
<?php
namespace Drupal\mymodule\Plugin\simple_sitemap\SitemapGenerator;
use Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\SitemapGeneratorBase;
/**
* Class Sitemap.
*
* @package Drupal\mymodule\Plugin\simple_sitemap\SitemapGenerator
@bdlangton
bdlangton / sudoers
Created March 4, 2020 22:10
Don't require password for vagrant commands
Type: sudo visudo
Add the following to the end of the file:
# Set these vagrant commands so that they don't require entering a password.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart