- Go to: 'System Preferences' >> 'MySQL' and stop MySQL
OR,
- sudo /usr/local/mysql/support-files/mysql.server start
- sudo /usr/local/mysql/support-files/mysql.server stop
import json | |
import boto3 | |
import base64 | |
import os | |
from cryptography.hazmat.primitives import serialization | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.asymmetric import padding | |
from botocore.exceptions import ClientError |
/////// | |
// Warning, code untested | |
/////// | |
type Thinger interface { | |
SomeMethod( arg bool ) bool | |
} | |
type RealThing struct { | |
state bool |
Amazon Redshift is a cloud data warehouse tool included in AWS. You can manage your data warehouse clusters using the AWS management Console or using the Amazon Redshift APIs. This post demonstrates a small subset of the Redshift API to create clusters from a snapshot and vice versa using a bash shell script.
If you want to delete a cluster, you have a choice of saving it first as a snapshot or deleting it with no final snapshot. With a snapshot, you can restore the cluster at a later time. If you choose not to save it as a snapshot, then the cluster will be deleted permanently with no restore option. In this case, you would have to recreate the cluster manually from scratch.
The script below only gives the user the option to save an existing cluster to a snapshot or restoring a cluster from an existing snapshot. To provide a measure of security and protection, you should set up IAM policies that walls off clusters and snapshots from accidental deletes or unprivileged access to your data.
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
SSH Login as openvpnas user | |
$ ssh openvpnas@<open-vpn-server-ip> | |
$ cd /usr/local/openvpn_as/scripts/ # Go to OpenVPN AS Scripts directory | |
$ sudo ./sacli --user USERNAME GoogleAuthRegen # Replace USERNAME with username to get a new Google Authenticator Secret | |
Source: https://forums.openvpn.net/viewtopic.php?t=15366 |
# Read more about Slack webhooks here: https://api.slack.com/messaging/webhooks | |
curl -X POST \ | |
-H 'Content-type: application/json; charset=utf-8' \ | |
--data '{ "channel": "#mychannel", "username": "superbot", "icon_emoji": ":bot:", "text": "Foo" }' \ | |
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX |
# | |
# Git attributes for Unity projects | |
# | |
# Compiled by the GameCI community - https://game.ci | |
# | |
# Latest version at https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc | |
# | |
# Ensure that text files that any contributor introduces to the repository have their line endings normalized | |
* text=auto |
#!/bin/bash | |
# | |
# Ashutosh Agrawal | |
# http://blog.theprogrammer.in | |
# | |
# | |
# This bash script simply fetches the log for that hour from Amazon RDS, | |
# parse and genarlise it using mysql_slow_log_parser (https://gist.github.com/theprogrammerin/e3206a4ec7a7a4086ac2) | |
# and then push the parsed log to elastic search using logstash (slowquery.conf)(https://gist.github.com/theprogrammerin/034a3efd849112d166ea) | |
# For analysis on analytic tool like kibana. |
#!/bin/bash | |
set -o pipefail -o errexit -o nounset -o errtrace | |
mkdir -p backup/ | |
for ns in $(kubectl get ns --no-headers -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'); do | |
kubectl --namespace="${ns}" get -o=yaml role,rolebinding,secret,configmap | \ | |
yq eval ' | |
del( |