Skip to content

Instantly share code, notes, and snippets.

View mogox's full-sized avatar
🇲🇽
🤖

Enrique Carlos Mogollan mogox

🇲🇽
🤖
View GitHub Profile
@mogox
mogox / gist:1268017
Created October 6, 2011 17:25
Mixpanel Javascript Object for testing
var mpq = {}
fns = ["init","track","track_links","track_forms","register","register_once","identify","name_tag","set_config"];
_.each(fns, function(f) {
mpq[f] = function() { return true };
});
@mogox
mogox / gist:7299336
Last active December 27, 2015 08:49
Healthcare initiatives where rubyist can participate
@mogox
mogox / gist:9143210
Last active March 29, 2016 00:24
Git tips(reminders)

Adding a remote

git remote add upstream https://github.com/otheruser/repo.git

List of remotes

git remote -v
@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"
@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: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 / 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 / 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 / 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 / readme.md
Created August 29, 2016 18:48
Git shortcuts, or the things that I use and I forget