Skip to main content

Posts

Showing posts with the label linux

Remote Remote Work: Make coding on EC2 Instances Easier

In an effort to post a bit more here's the first entry in my No Frills series. This posts will be short, and mostly reference outside sources. So you need to access resources in a remote network like AWS or Azure, but don't want to use ssh + vim/emacs/etc or don't want to constantly be pushing commits? This solution is for you! You'll need a Unix-like environment such as Ubuntu on your server side, a terminal locally with SSH, and ideally VS Code.   First install tmux, if you're not familiar check out a tutorial like this one . This cheat sheet is very handy too! In your ~/.bashrc (or appropriate shell config file) add the following so you'll always have access to tmux easily: # Open Tmux Session immediately on SSH and exit SSH Session when exiting tmux if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux; exit; fi     Now ...

The Keymaker: Simplifying Your Personal SSH Key Management

Image from here . Screen shot from film The Matrix Reloaded If you are like myself, and ssh into multiple remote machines, or even simply use Github over ssh this is for you. The Problem SSH has a lot of settings you can use, but when you're a relatively new developer you're not going to go mucking around in a config file you don't need to when there's work to be done! There are also security concerns with some settings, and issues if you have a lot of ssh keys. Also typing long username@domain strings can be annoying. The Solution The Keymaker   o——m , a small script (fewer than 250 lines) to help create ssh keys for remote machines. What does it do? First it helps you create a config file. If one exists already it will rename it with the suffix ".BACKUP". By default all ssh connections will show a randomart image ( VisualHostKey yes ) based on the public key provided by the host. This randomart image can be used to visually identify t...

How to install RHQ on CentOS

This guide was originally written for a work project, but I was given permission to blog about it. My Virtual Machine Setup You can of course use whatever you would like but this is my setup. OS: CentOS 6.3 64-bit Desktop Virtual Machine Software : VMWare Player Virtual Machine Specs : about 2-3GB of memory and 2 Processors Install the OS with VMWare Player, its handy Easy Install will do most of that work for you, so you can walk away until it's finished. Linux/CentOS Usage Notes For those unfamiliar with Linux here are some quick notes If you are not comfortable with using vi, simply replace any instance of ‘vi’ with ‘nano’. Nano is a much more user-friendly command line text editor. Nano overview of nano     Keys work as you would expect, you can type instantly and arrows move the cursor around. Move the cursor down past the bottom to scroll.       Press Ctrl-O (shown as ^O) to save (shown as WriteOut)  ...

Script to create full CVS Changelogs

Background CVS Commit histories are saved file-by-file. In my coursework we were required to use a CVS repository to create a group project. Why did I do this? I didn't like having to check individual files to find out what's been changed so I did some looking and found cvs2cl that would create a changelog. How I solved the problem Luckily I have a Raspberry Pi sitting around so I created this script to automatically create full changelogs each time a new commit was found. (Mine checks every 15 minutes for new commits). Several things one would need to do to replicate this setup. 1) Checkout the project from the CVS repo manually 2) Update the regex on line 15 to match the username naming scheme 3) Install cvs2cl 4) Install/setup exim4 (which allows me to send email through my secondary Gmail account) 5) Change YOU@DOMAIN.COM to the email you wish the log to be sent to. 6) Edit crontab to have the script run automatically (or set it up some other way) NOTE...