Skip to content

Instantly share code, notes, and snippets.

View deivid-rodriguez's full-sized avatar

David Rodríguez deivid-rodriguez

View GitHub Profile
@deivid-rodriguez
deivid-rodriguez / gist:d0a0c5ca2ae6a33c7396d904d67e06a0
Created June 12, 2018 14:08
Decidim development app creation log
deivid@pantani ~/Code $ git clone decidim/decidim decidim_clone
Clonando en 'decidim_clone'...
remote: Counting objects: 81488, done.
remote: Compressing objects: 100% (442/442), done.
remote: Total 81488 (delta 181), reused 90 (delta 41), pack-reused 80982
Recibiendo objetos: 100% (81488/81488), 47.96 MiB | 1.77 MiB/s, listo.
Resolviendo deltas: 100% (47037/47037), listo.
deivid@pantani ~/Code $ cd decidim_clone/
@deivid-rodriguez
deivid-rodriguez / Console explanation
Created May 6, 2018 14:13
Chromdriver-helper forces me to use it on every project once I install it on a single project
deivid@pantani ~/Code/test_app $ cat Gemfile
source "https://rubygems.org"
# My superawesome project with a lot of dependencies that does a lot of cool
# stuff, does not depend on chromedriver-helper and gets tested using a chromedriver
# version globally installed at /usr/local/bin/chromedriver
deivid@pantani ~/Code/test_app $ chromedriver --version
ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)
(restricted_collaborations) deivid@pantani ~/Code/decidim-module-crowdfundings $ bundle
Fetching gem metadata from https://rubygems.org/.......
Fetching https://github.com/decidim/decidim
fatal: No se pudo analizar el objeto 'ff36d24dbe1cf7aa99e5eeea1ff38e6aeeb2af92'.
Git error: command `git reset --hard ff36d24dbe1cf7aa99e5eeea1ff38e6aeeb2af92` in directory
/home/deivid/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems/decidim-ff36d24dbe1c has failed.
If this error persists you could try removing the cache directory
'/home/deivid/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/cache/bundler/git/decidim-9495d3039168996748af12c0fdb04debdea10392'
(restricted_collaborations) deivid@pantani ~/Code/decidim-module-crowdfundings $ rm -rf /home/deivid/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems/decidim-ff36d24dbe1c/.git/
@deivid-rodriguez
deivid-rodriguez / rubocoper
Last active November 17, 2021 13:19
Adds RuboCop to a project, one commit per cop
#!/usr/bin/env ruby
require 'open3'
#
# Adds RuboCop to a project, one cop per commit
#
class RuboCoper
def run
autocorrect_all
@deivid-rodriguez
deivid-rodriguez / alarm.sh
Created December 15, 2015 00:24 — forked from bdjnk/alarm.sh
Bash Suspend Alarm Clock with Gradual Volume and Fallback
#!/bin/bash
__script_version="1.0"
#-----------------------------------------------------------------------
# Default values
#-----------------------------------------------------------------------
human_time="7 tomorrow"
@deivid-rodriguez
deivid-rodriguez / chruby.diff
Last active August 29, 2015 14:17
wwtd chruby support
diff --git a/lib/wwtd/ruby.rb b/lib/wwtd/ruby.rb
index ead4876..fb41fb3 100644
--- a/lib/wwtd/ruby.rb
+++ b/lib/wwtd/ruby.rb
@@ -6,6 +6,7 @@ module WWTD
end
# - rvm: "rvm xxx do"
+ # - chruby: "chruby-exec xxx --"
# - others: env hash
@deivid-rodriguez
deivid-rodriguez / Diff
Last active August 29, 2015 14:17
Problems with TravisLint in overcommit
diff --git a/.overcommit.yml b/.overcommit.yml
new file mode 100644
index 0000000..b265629
--- /dev/null
+++ b/.overcommit.yml
@@ -0,0 +1,19 @@
+#
+# Use this file to configure the Overcommit hooks you wish to use. This will
+# extend the default configuration defined in:
+# https://github.com/causes/overcommit/blob/master/config/default.yml
@deivid-rodriguez
deivid-rodriguez / test_byebug_against_specific_ruby
Created March 20, 2015 17:46
Helper script to help git bisecting byebug
#!/bin/bash
# Source RVM as a function into local environment.
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
# Compile and install Ruby
./configure
make && sudo make install
# Setup convenient variables
diff --git a/lib/byebug/remote.rb b/lib/byebug/remote.rb
index a782cfc..33d629c 100644
--- a/lib/byebug/remote.rb
+++ b/lib/byebug/remote.rb
@@ -1,96 +1,105 @@
require 'socket'
module Byebug
- # Port number used for remote debugging
- PORT = 8989 unless defined?(PORT)