Skip to content

Instantly share code, notes, and snippets.

@mwin007
mwin007 / rm_mysql.md
Created August 26, 2020 16:38 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@mwin007
mwin007 / create-mysql.bash
Created August 26, 2020 15:44 — forked from askz/create-mysql.bash
Simple bash script to create mysql db, user with generated password
#!/bin/bash
# The script will fail at the first error encountered
set -e
PASS=`pwgen -s 40 1`
mysql -uroot <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost';
@mwin007
mwin007 / cloud9-setup.sh
Created June 8, 2020 00:15 — forked from thibaudgg/cloud9-setup.sh
Rails 5: The Tour - Step by Step
#!/bin/sh
# Clean workspace
rm -rf *
rm .gitignore
# Upgrade Ruby
rvm install ruby-2.4.1 --default
# Start PostgreSQL and fix encoding conflict when creating database

import javax.annotation.* cannot be resolved in Eclipse's Java 10 Compiler

You can try to add annotation dependencies to pom.xml, so that they would be available for Spring:

<dependency>
  <groupId>javax.annotation</groupId>
  <artifactId>javax.annotation-api</artifactId>
  <version>1.3.2</version>
</dependency>
@mwin007
mwin007 / AWS.md
Last active April 28, 2020 21:33

AWS Notes

File permission for pem file chmod 400 {keyfile}.pem

Back with tar and today's date: tar -zcvf "htdocs$(date '+%Y-%m-%d').tar.gz" htdocs

Rsync example \n rsync -av — progress -e “ssh -i /home/mn/Documents/AWS/LightsailDefaultKey-us-east-1.pem” /home/mn/wordpress-5.4-0/apps/wordpress/htdocs/wp-content/themes/porto [email protected]:/home/bitnami/apps/wordpress/htdocs/wp-content/themes/

@mwin007
mwin007 / rubyonrails.md
Last active April 25, 2020 19:02
Ruby on Rails notes and snippets
@mwin007
mwin007 / bootstrap-ror.md
Last active April 25, 2020 19:03
Add Bootstrap to a Ruby on Rails Application
@mwin007
mwin007 / install-rvm-ubuntu.md
Last active April 25, 2020 19:03
Install Ruby on Rails with RVM on Ubuntu 18.04