Skip to content

Instantly share code, notes, and snippets.

View brunneis's full-sized avatar

Rodrigo Martínez brunneis

View GitHub Profile
@brunneis
brunneis / create-systemd-service.md
Created October 31, 2019 08:39
Create a systemd service
  1. Create a service file at /usr/lib/systemd/system/<name>.service
  2. systemctl enable <name>
  3. systemctl start <name>

Service template:

[Unit]
Description=

[Service]
@brunneis
brunneis / info.md
Last active October 21, 2019 10:32

OpenSSL

cp /etc/ssl/openssl.cnf openssl.cnf

mkdir demoCA
mkdir demoCA/certs
mkdir demoCA/crl
mkdir demoCA/newcerts
mkdir demoCA/private
### Keybase proof
I hereby claim:
* I am brunneis on github.
* I am brunneis (https://keybase.io/brunneis) on keybase.
* I have a public key ASCtEkh-r6DR4wevfrOLt0wPyDXSdjRzU3Xa0Opu8pagnAo
To claim this, I am signing this object:
@brunneis
brunneis / fix-gcc-build-macos.sh
Created August 7, 2019 20:06
Fix GCC builds on MacOS Mojave
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
@brunneis
brunneis / enable-wol.md
Created July 31, 2019 21:31
Enable Wake on Lan with a Magic Packet | Fedora, CentOS, RHEL
dnf -y install ethtool
ethtool -s eth0 wol g
@brunneis
brunneis / static-ip-fedora-centos-network-manager.md
Last active July 23, 2019 20:58
Fedora 30+ static networking / CentOS 7+

Show the available interfaces:

nmcli device

Edit the interface configuration file

/etc/sysconfig/network-scripts/eth0
@brunneis
brunneis / set-utc-timezone.sh
Created July 14, 2019 11:52
Set UTC timezone (UTC ±00:00)
#!/bin/bash
timedatectl set-timezone UTC
@brunneis
brunneis / install-base-azure-centos.sh
Last active June 13, 2019 17:20
Azure Kafka node (CentOS 7)
#!/bin/bash
# Misc
yum -y update
yum -y install epel-release
yum -y install htop nano git
yum -y groupinstall "Development Tools"
# Yarn / Node
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
@brunneis
brunneis / install-leveldb.sh
Created May 14, 2019 16:36
Install plyvel package on MacOS (leveldb)
#!/bin/bash
brew install leveldb
CFLAGS='-mmacosx-version-min=10.7 -stdlib=libc++' pip install plyvel
@brunneis
brunneis / tips.sh
Created April 22, 2019 14:21
MacOS tips
# VM_PAGER_COMPRESSOR_NO_SWAP
sudo nvram boot-args="vm_compressor=2"