Skip to content

Instantly share code, notes, and snippets.

View dominicsayers's full-sized avatar
☣️
I'm back

Dominic Sayers dominicsayers

☣️
I'm back
View GitHub Profile
@dominicsayers
dominicsayers / elasticsearch.md
Last active March 2, 2024 15:52
Configuring ElasticSearch to use less memory

What I actually did

/etc/security/limits.conf

elasticsearch hard memlock 100000

/etc/default/elasticsearch

@dominicsayers
dominicsayers / git-config-global.md
Last active June 17, 2023 12:47
My global git config
$ git config --global --list
user.name=Dominic Sayers
user.email=dominic@sayers.cc
user.signingkey=C7750E92
commit.gpgsign=true
core.editor=code --wait
rebase.autosquash=true
pull.rebase=true
tag.gpgsign=true
@dominicsayers
dominicsayers / postfix-dovecot-subdomains.md
Last active April 10, 2023 17:39
Installing Postfix & Dovecot on a fresh Amazon EC2 Ubuntu Server 12.10 instance and setting it up so all mail to all subdomains goes to one local user with IMAP access.

Instance setup

  1. Make sure the security group is allowing through any ports you need for SMTP & IMAP. Also open port 10000 for Webmin.
  2. You'll want to give it an Elastic IP address so it doesn't wander aimlessly round the IPv4 address space.

Webmin setup

  1. sudo apt-get install ntp ntpdate dkms htop - optional: these are just my favourite things
  2. sudo pico /etc/apt/sources.list and add at the end:
@dominicsayers
dominicsayers / docker-on-raspberry-pi.md
Last active February 16, 2023 09:34
Installing docker on a Raspberry Pi running Ubuntu

Installing docker on a Raspberry Pi running Ubuntu

Basic docker

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
  "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Installing Webmin on Ubuntu 22.04

The canonical instructions here are pretty good but there's a glaring error. Actually it's not glaring, it took me many hours of frustration to spot it. But you're not interested in my emotional issues, you're here for the solution. Here it is:

The instructions tell you to create a webmin.list file containing this:

deb [signed-by=/usr/share/keyrings/jcameron-key.gpg] https://download.webmin.com/download/repository sarge contrib
@dominicsayers
dominicsayers / virtualbox.md
Last active October 10, 2022 19:18
Installing Virtualbox 4.3 on Ubuntu Server 13.10 64-bit

First install Virtualbox

  1. sudo pico /etc/apt/sources.list.d/virtualbox.list
  2. Add deb http://download.virtualbox.org/virtualbox/debian saucy contrib non-free
  3. wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
  4. sudo apt-get update
  5. sudo apt-get install dkms unzip
  6. sudo apt-get install virtualbox-4.3 --no-install-recommends
  7. wget http://download.virtualbox.org/virtualbox/4.3.6/Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack
  8. sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack

TigerGraph Docker cheatsheet

Information

docker ps -a | grep tiger

List all containers with tiger in their name or image name.

docker logs -f tiger-local-development

Gem::Specification.new do |spec|
spec.name = "oc-events-jobs"
spec.version = ""
spec.summary = ""
spec.authors = ""
spec.files = []
end
@dominicsayers
dominicsayers / s3cmd_install.md
Created March 6, 2013 16:36
Installing s3cmd on Ubuntu Server
  1. sudo apt-get install python-setuptools
  2. wget http://downloads.sourceforge.net/project/s3tools/s3cmd/1.5.0-alpha1/s3cmd-1.5.0-alpha1.tar.gz
  3. tar xvfz s3cmd-1.5.0-alpha1.tar.gz
  4. cd s3cmd-1.5.0-alpha1
  5. python setup.py install
  6. s3cmd --configure
@dominicsayers
dominicsayers / git-bisect-cheatsheet.md
Last active October 22, 2020 08:24
git bisect cheatsheet
$ git bisect start
$ git bisect bad
$ git bisect good dd9b00ad73d71a84e11523c062048daaa8e590e9
Bisecting: 14 revisions left to test after this (roughly 4 steps)
[e6ac8fb2b6c9ee04d0600690f477e785f6c02330] Delegate create_graph_node to the graph client
$ git bisect run rspec ./spec/integration/company_branch_spec.rb:49

...