How to get rid of search domain on Ubuntu Linux in Azure

  05-18-2018 · Tagged under: azure, dns, reddog

If you’ve used Linux on Azure for any length of time you’ll find an annoying search domain that Azure DHCP appends to your resolv.conf. Here’s a copy of my resolv.conf as an example. # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver nameserver search Microsoft does this by default even if you have your own internal name servers since the DHCP process within a VNET is handled by Azure.


How to configure Nginx as a reverse proxy

  10-25-2017 · Tagged under: nginx, reverse-proxy

If you need to configure Nginx as a reverse proxy here is a quick snippet to do so. This snippet listens on port 443/TLS and redirects users to port 3000 localhost. If you only want to listen on 443 you can remove the redirect on port 80. Replace the with your own server name. You also need to replace the ssl_certificate + ssl_certificate_key with your own, you can remove the SSL section if you don’t wish to use SSL.


Homebrew Cheet Sheet

  10-17-2017 · Tagged under: macos, homebrew

Here is a short cheet sheet on using homebrew, these are common everyday things you’ll run into or at least I ran into while using homebrew. There is actually a FAQs on all this but I didn’t find this out till I wrote this… Listing installed packages brew list Clean up builds This can save a bit of space if you haven’t run it in a while. brew cleanup Pinning a formula Pinning a formula is useful to prevent it from being upgraded.


How to enable passwordless sudo in macOS

  10-16-2017 · Tagged under: macos, sudo

If you edit your /etc/host file on macOS or need to bind to a privileged port for local web testing then you’ll probably use sudo a lot. It can get really annoying having to constantly apply your password for each sudo command so just like in Linux we can disable the password prompt. To do open up /etc/sudoers duplicate and uncomment the first %admin group entry #%admin ALL = (ALL) ALL and replace with:


How connect Hubot to Slack on CentOS

  10-03-2017 · Tagged under: hubot, chatops

In this post we will install Hubot your friendly neighborhood chatbot on CentOS. First get node installed. sudo yum -y install nodejs We then install yeoman + generator-hubot using npm. sudo npm install -g yo generator-hubot Create a directory to host the code generated. I’m calling my dir hal but it can be whatever you want. Once you run yeoman, you’ll get prompted for a few inputs from the script.


Using Let's Encrypt in a lab environment

  09-20-2016 · Tagged under: ssl, lets-encrypt

If you’re playing with Let’s encrypt in an internal environment such as a lab, chances are you’re failing to generate your certs since the Let’s encrypt agent performs a domain validation process where it spins up a python web server and hosts a http resource that the CA can fetch. Here’s what I did in my lab environment which was not publicly accessable in order to obtain certs for valid domains I did have running on external servers.


How to create a Puppet certificate with multiple DNS names

  09-01-2016 · Tagged under: puppet

If you are running Puppet in an environment that leverages multiple DNS records for the master possibly related to a DNS naming schema then you’ll likely run into an issue where the agent will complain that the master’s certificate does not match the actual hostname. When a Puppet master is initially configured, it will use the hostname derived from the system by default. In order to support multiple hostnames on the certicate you’ll need to regenerate the cert.


Collecting OS X metrics with Glances and Influxdb

  07-17-2016 · Tagged under: influxdb, metrics

I spent some time playing with Influxdb and Grafana and found out that the OS metrics tool Glances can directly import stats directly into Influxdb. This is cool because it will save us a ton of time in writing our own metric collection agents. As a test, I decided to send all my Macbook metrics to Influxdb and see Grafana would display. To do this I had to make sure that Glances was installed.


How to build Vim 7.4 with Lua support on CentOS 7

  06-25-2016 · Tagged under: vim

If you use Vim on CentOS 7 and use neocomplete for code completion then you’ll probably notice that you’ll receive an error that Lua isn’t available when you try to install the plugin. Although Vim can be compiled from source to enable Lua support, it’s pretty messy and can probably be better handled with a RPM for better distribution and repeatability. Thanks to the work from Karsten Hopp, Vim with Lua support was built for Fedora Core 19, however we’re on CentOS 7 and will need to rebuild the source rpm.