Skip to content

Instantly share code, notes, and snippets.

View leafney's full-sized avatar

Leafney leafney

View GitHub Profile
@nickcernis
nickcernis / mariadb-brew-macos.md
Created July 13, 2020 15:13
Install MariaDB with brew on macOS and fix the “access denied” issue

Attempting mysql -u root fails with Access denied for user 'root'@'localhost immediately after doing brew install mariadb and starting mariadb with brew services start mariadb.

To fix it (with MariaDB still running):

  1. sudo mysql then enter your Mac user password
  2. ALTER USER 'root'@'localhost' IDENTIFIED BY 'newrootpassword'; replacing newrootpassword with the password you wish to use for the MariaDB root user.
  3. Ctrl-C to exit mysql.

You should then be able to connect to MariaDB with mysql -u root -p, then entering the root password when prompted.

@ResoDev
ResoDev / dart.json
Created December 26, 2019 07:47
MobX Store Boilerplate Snippet
"MobX Store": {
"prefix": "ms",
"body": [
"import 'package:mobx/mobx.dart';",
"",
"part '${1}_store.g.dart';",
"",
"class ${1/(.*)/${1:/pascalcase}/g}Store extends _${1/(.*)/${1:/pascalcase}/g}Store with _$${1/(.*)/${1:/pascalcase}/g}Store {}",
"",
"abstract class _${1/(.*)/${1:/pascalcase}/g}Store with Store {",
@innovia
innovia / kubernetes_add_service_account_kubeconfig.sh
Last active January 29, 2024 23:00
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*