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
@mwin007
mwin007 / spring-cert.md
Last active April 25, 2020 19:07 — forked from danielvaughan/spring-cert.md
Becoming a Spring Certified Professional without the Core Spring Course

Becoming a Spring Certified Professional without the Core Spring Course

Until recently, the only way you could become a Certified Spring Professional was to take Pivotal’s compulsory, 4-day, Core Spring training course. On completion of the course, participants received an exam voucher that allowed them to schedule an exam at a certification centre.

At approximately £2.5k per attendee, the course is not cheap putting certification out of the reach of many self-funded developers and those that work for organisations without generous training budgets.

In May 2017 Pivotal changed their policy. Spring Certification Exams became available for individual purchase without enrolling in the course. I set out to see if it was possible to pass the exam without the Core Spring course and only using publically available material.

I set myself a budget of £250, ap

@mwin007
mwin007 / RAILS_5_CHEATSHEET.md
Created August 27, 2018 00:57 — forked from harrietty/RAILS_5_CHEATSHEET.md
Ruby on Rails 5 Cheatsheet

Ruby on Rails Cheatsheet (5.1)

Architecture

RVM

$ rvm list - show currently installed Rubies

@mwin007
mwin007 / DockerFile_app
Created April 23, 2018 01:28 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Configuring main directory
RUN mkdir -p /app_name
WORKDIR /app_name
# Setting env up
ENV RAILS_ENV='production'
ENV RAKE_ENV='production'
@mwin007
mwin007 / RAILS_CHEATSHEET.md
Created April 19, 2018 21:36 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@mwin007
mwin007 / Default.sublime-theme
Created August 3, 2017 15:51 — forked from anonymous/Default.sublime-theme
Sublime Text 2 Default theme file
[
{
"class": "label_control",
"color": [255, 255, 255],
"shadow_color": [24, 24, 24],
"shadow_offset": [0, -1]
},
{
"class": "button_control",
"content_margin": [6, 5, 6, 6],