-
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
# 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 ### |
(function(root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(['backbone.marionette', 'backbone.radio', 'underscore'], function(Marionette, Radio, _) { | |
return factory(Marionette, Radio, _); | |
}); | |
} | |
else if (typeof exports !== 'undefined') { | |
var Marionette = require('backbone.marionette'); | |
var Radio = require('backbone.radio'); | |
var _ = require('underscore'); |
#!/bin/bash | |
set -e | |
set -x | |
provision_command="wget -O- https://gist.github.com/sobrinho/4774041 | sh" | |
ssh root@server1 "$provision_command" | |
ssh root@server2 "$provision_command" |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
# .railsrc for Rails 3, encoding: utf-8 | |
# see http://rbjl.net/49-railsrc-rails-console-snippets | |
if !Rails.application then warn "Rails isn't loaded, yet... skipping .railsrc" else | |
# # # | |
def ripl?; defined?(Ripl) && Ripl.instance_variable_get(:@shell); end | |
# # # | |
# loggers |