Skip to content

Instantly share code, notes, and snippets.

pablosalgadom

Block or report user

Report or block pablosalgadom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@operatino
operatino / MySQL_5-7_macOS.md
Last active Oct 17, 2019 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew
View MySQL_5-7_macOS.md

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
View restore_mac_trash.pl
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }
@cpq
cpq / restore_mac_trash.pl
Created Jan 22, 2015
MacOS: restore all files from Trash folder to their original location
View restore_mac_trash.pl
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }
@JunichiIto
JunichiIto / alias_matchers.md
Last active Oct 17, 2019
List of alias matchers in RSpec 3
View alias_matchers.md

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active Jan 29, 2019
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
@Theby
Theby / devise.es.yml
Created Jan 6, 2014
Traducción al español/castellano (usted) para usar con la gema Devise de Ruby.
View devise.es.yml
# Traducciones adicionales en https://github.com/plataformatec/devise/wiki/I18n
es:
devise:
confirmations:
confirmed: "Su cuenta ha sido confirmada."
confirmed_and_signed_in: "Su cuenta ha sido confirmada. Ha sido identificado correctamente."
send_instructions: "Recibira un correo electrónico en unos minutos con instrucciones sobre cómo restablecer su contraseña."
send_paranoid_instructions: "Si su correo electrónico existe en nuestra base de datos recibirás un correo electrónico en unos minutos con instrucciones sobre cómo reiniciar su contraseña."
failure:
View capybara.md

Capybara

save_and_open_page

Matchers

have_button(locator)
@viola
viola / gist:1070410
Created Jul 7, 2011
Example of fetching Hash (key,value) to the simple_form collection.
View gist:1070410
-- model
some sort of constant hash:
HASH_NAME = {
0 => "Choose:",
1 => "On-Campus Recruiting - CSO",·
2 => "CSO Staff Referral",
3 => "Faculty Contact",·
4 => "Career Day",·
5 => "CSO Summer Job Listing",·
6 => "Alumni Contact",·
You can’t perform that action at this time.