-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
# Donwloads project | |
echo "\033[0;32m## Installing \033[1;34mdocker dependecies\033[0;37;00m" | |
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
echo "\033[0;32m## Adding \033[1;34mdocker gpg key\033[0;37;00m" | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -f - | |
sudo apt-key fingerprint 0EBFCD88 | |
echo "\033[0;32m## Adding \033[1;34mdocker respository\033[0;37;00m" | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
# the instructions from here: https://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu/31089915#31089915 | |
# worked, but only after I added in line 8 | |
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat | |
sudo apt-get autoremove | |
sudo apt-get install imagemagick libmagickwand-dev | |
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config | |
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig | |
gem install rmagick |
# Add the "https://github.com/jwt/ruby-jwt" gem to your "Gemfile" | |
gem 'jwt' |
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"REST URL PATH"]]; | |
NSData *imageData = UIImageJPEGRepresentation(image, 1.0); | |
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; | |
[request setHTTPShouldHandleCookies:NO]; | |
[request setTimeoutInterval:60]; | |
[request setHTTPMethod:@"POST"]; | |
NSString *boundary = @"unique-consistent-string"; |
### Add those lines after *filter near the beginning of the file | |
:ufw-http - [0:0] | |
:ufw-http-logdrop - [0:0] | |
### Add those lines near the end of the file | |
### Start HTTP ### |
# Este aquivo fica em app/models/sponsor.rb | |
class Sponsor < ActiveRecord::Base | |
# aqui fica meu codigo e scopes | |
end |
require 'active_support/all' | |
class FreeleticsLogin | |
def self.log(*args) | |
new(*args).log | |
end | |
def initialize(email, password) | |
self.login_url = 'https://www.freeletics.com/api/user/v1/auth/password/login' | |
self.email = email |
File.open("#{Rails.root}/public/countries.txt", 'w') do |file| | |
countries = [] | |
Country.all.each do |country| | |
next if country.sponsors.count.zero? | |
countries << [country.sponsors.count, country.to_s] | |
end.nil? | |
file.puts "=" * 100 |
class CreateProfiles < ActiveRecord::Migration | |
def change | |
create_table :profiles do |t| | |
t.string :name | |
t.timestamps null: false | |
t.index :name | |
end | |
end | |
end |