Skip to content

Instantly share code, notes, and snippets.

View mogox's full-sized avatar
🇲🇽
🤖

Enrique Carlos Mogollan mogox

🇲🇽
🤖
View GitHub Profile
@mogox
mogox / bottles.rb
Last active March 21, 2018 23:56
Initial version of the 99 Bottles exercise
class Bottles
def verse(number)
return zero_down if number == 0
<<-VERSE
#{bottles_current(number)}
#{bottles_down(number)}
VERSE
end
@mogox
mogox / keybase.md
Created September 7, 2016 07:56
keybase.md

Keybase proof

I hereby claim:

  • I am mogox on github.
  • I am mogox (https://keybase.io/mogox) on keybase.
  • I have a public key whose fingerprint is 3832 45AA D315 9633 007D 711C C16E 8BD6 5087 4582

To claim this, I am signing this object:

@mogox
mogox / readme.md
Created August 29, 2016 18:48
Git shortcuts, or the things that I use and I forget
@mogox
mogox / run_bundle_on_hl7_gems.sh
Last active July 27, 2016 18:18
Bundle install with ruby-hl7 and ruby-hl7-zps
2.1.5 in test_hl7/
› cat Gemfile
source 'http://rubygems.org'
gem 'ruby-hl7'
gem 'ruby-hl7-zps'
2.1.5 in test_hl7/
› bundle install
Fetching gem metadata from http://rubygems.org/.....
@mogox
mogox / Encrypt-staging-1life-doc-bucket-15-december.data
Last active December 15, 2015 21:07
Staging S3 encryption status
Legend:
-: The file is already using SSE
E: The file was just encrypted
U: Unencrypted file
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
@mogox
mogox / tmux.md
Last active August 29, 2015 14:28
Things I learn about tmux

SSH with the current tmux sessions

ssh ubuntu@server.atdomain.com -t tmux a

Detach (close the connection)

  • [ctrl] + [b]
  • [d]

List Sessions

  • [ctrl] + [b]
@mogox
mogox / gist:6ee46687754798a4a994
Created February 6, 2015 07:31
ejemplo de attr_accessor
class Bowling
attr_accessor :rolls
attr_accessor :result
def initialize(result)
@rolls =[]
@result = result
end
def roll(pins)
@mogox
mogox / gist:5da18f31dee9bf160ff0
Created August 21, 2014 22:54
How to use includedByState on ng-hide (Angular UI, angular-route, state)
<li class="messages" ng-hide="'messaging' | includedByState">
<a href="#messages-ui-tab" ng-click="goToState({Id: <%= @user.id %>})">Messages</a>
</li>
<li class="messages" ng-show="'messaging' | includedByState">
<a href="#messages-ui-tab">Link2 - 2 </a>
</li>
@mogox
mogox / gist:6d94da2d2655c3c4b3e8
Created July 8, 2014 05:22
Generate simple access code using Haddock
# The gem: https://github.com/stephencelis/haddock
#
require 'haddock'
include Haddock
(1..8).each{ p Password.generate.match(/\w+/)[0] }
=>"mud74"
"nondo6"
"auh2_guarani"
"voicing7"