Skip to content

Instantly share code, notes, and snippets.

View asachs01's full-sized avatar
Caffeinated.

Aaron Sachs asachs01

Caffeinated.
View GitHub Profile
@lg
lg / adding-tailscale-to-edgerouter.md
Last active April 11, 2024 07:44
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@berkant
berkant / cloud-init.cfg
Last active April 26, 2024 17:58
Cloud-init config to set up my Ubuntu dev machine.
## template: jinja
#cloud-config
{% if v1.distro_release == 'focal' %}
users:
- name: berkant
shell: /usr/bin/bash
ssh_import_id: gh:berkant
sudo: ALL=(ALL:ALL) NOPASSWD:ALL
@cwjohnston
cwjohnston / gist:d9b59e701266b69470aa60132815027d
Created October 28, 2019 16:34
Setting up postgres on Centos 7 for Sensu Go
# postgres setup on centos 7
```
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7.7-x86_64/pgdg-redhat10-10-2.noarch.rpm
yum install postgresql10-server postgresql10
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl start postgresql-10
systemctl enable postgresql-10
systemctl status postgresql-10
sudo -u postgres psql
```
@troyfontaine
troyfontaine / README.md
Last active December 22, 2022 16:04
USG ddclient Upgrade Script

How to use this script?

Why, that's simple! Copy this script to your USG, run chmod +x on it and then, as a user with sudo permission, execute it.

Shamelessly borrowed from Brittanic on the Ubiquiti Unifi forums

How to use it?

Simply run the following command (note, if you are at all security concious-don't run it and instead review the script, then copy it to your USG to execute).

curl https://gist.githubusercontent.com/troyfontaine/7e6f93e32621177fc9a94e823adc52b5/raw/fix_ddns.sh | sudo bash
@cwjohnston
cwjohnston / Requirements.md
Last active October 17, 2017 17:57
Minimum Viable Sensu with Vagrant

In order to complete the Minimum Viable Sensu workshop on your own computer, please install the following:

With these applications installed, and the Vagrantfile copied an otherwise empty directory, run vagrant up to download the required Vagrant box and start the VM.

Once the box file is downloaded and the VM is running, use vagrant ssh to log in to the VM via ssh.

@subfuzion
subfuzion / README.md
Last active May 11, 2024 17:03
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,

@wmealing
wmealing / C-states.md
Last active May 17, 2024 07:53
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@shockalotti
shockalotti / Go golang - average array of 5 numbers (more efficient)
Last active March 3, 2021 14:40
Go golang - average array of 5 numbers (more efficient)
package main
import "fmt"
func main() {
x:= [5]float64{
98,
93,
77,
82,