Skip to content

Instantly share code, notes, and snippets.

View nirbhayc's full-sized avatar

Nirbhay Choubey nirbhayc

  • Bloomberg LP
  • New York
View GitHub Profile
@nirbhayc
nirbhayc / systemctl
Created July 11, 2017 13:25
(Blog) Systemd + MariaDB
$ sudo systemctl set-environment MY.SUFFIX=""
Failed to set environment: Invalid environment assignments
@nirbhayc
nirbhayc / systemctl
Created July 11, 2017 13:24
(Blog) Systemd + MariaDB
$ sudo systemctl start mariadb@node1
$ sudo systemctl start mariadb@node2
@nirbhayc
nirbhayc / ExecStart
Created July 11, 2017 13:23
(Blog) Systemd + MariaDB
ExecStart=/usr/sbin/mysqld --defaults-group-suffix=%I \
$_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS
@nirbhayc
nirbhayc / ExecStart
Created July 11, 2017 13:22
(Blog) Systemd + MariaDB
ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/conf.d/my%I.cnf \
$_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS
@nirbhayc
nirbhayc / systemctl
Created July 11, 2017 13:20
(Blog) Systemd + MariaDB
$ sudo systemctl start mariadb@{suffix}
$ sudo systemctl start mariadb@node1
$ sudo systemctl start mariadb@node2
@nirbhayc
nirbhayc / find
Last active July 11, 2017 13:21
(Blog) Systemd + MariaDB
$ find /etc/mysql/conf.d/ -name 'my*'
/etc/mysql/conf.d/mynode1.cnf
/etc/mysql/conf.d/mynode2.cnf
@nirbhayc
nirbhayc / find
Last active July 11, 2017 13:21
(Blog) Systemd + MariaDB
$ find /lib/systemd/system -name 'mariadb*'
/lib/systemd/system/mariadb.service
/lib/systemd/system/mariadb@bootstrap.service.d
/lib/systemd/system/mariadb@.service
@nirbhayc
nirbhayc / config
Last active July 11, 2017 13:28
(Blog) Systemd + MariaDB
$ cat /etc/mysql/my.cnf
[mysqld]
<all common options>
[mysqldnode1]
<all options specific to node1>
[mysqldnode2]
<all options specific to node2>
@nirbhayc
nirbhayc / gowc.go
Created June 20, 2017 21:42
(Blog) Goroutines demo
/*
@file gowc.go
Count the number of vowels present in a text file.
*/
package main
import (
"flag"
"fmt"
@nirbhayc
nirbhayc / figlet.out
Last active June 20, 2017 21:40
(Blog) Figlet
$ figlet -ct -f script figlet
_ _
| | o | |
| | __, | | _ _|_
|/ | / | |/ |/ |
|__/|_/\_/|/|__/|__/|_/
|\ /|
|/ \|
$ figlet -ct -f digital figlet
+-+-+-+-+-+-+