sudo ifconfig (INTERFACE) ether (MAC ADDRESS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verso 1 | |
F C G Am | |
Alma mía dale gracias, | |
F C G Am | |
sus bondades no olvides jamás. | |
F C G Am | |
Es tu Dios quien te perdona, | |
F C G Am | |
de tus faltas no se acuerda ya. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def to_annotated_xml(root) | |
output = "<#{root}>" | |
each do |i| | |
if i.is_a?(Fixnum) | |
output << "<number>#{i}</number>" | |
elsif i.is_a?(String) | |
if i.match(/@/) | |
output << "<email>#{i}</email>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var aTags = document.getElementsByTagName('button'); | |
var searchText = "Follow"; | |
for (var i = 0; i < aTags.length; i++) { | |
if (aTags[i].textContent == searchText) { | |
found[i].click; | |
await sleep(1); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flatten(elem) | |
if elem.is_a?(Array) | |
if elem.empty? | |
[] | |
else | |
head, *tail = elem | |
flatten(head) + flatten(tail) | |
end | |
else | |
[elem] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/all' | |
def balance_group(members) | |
group1, group2 = members.in_groups(2) | |
mean1, mean2 = (group1.sum/group1.size.to_f), (group2.sum/group2.size.to_f) | |
if mean1.to_i == mean2.to_i | |
return [{mean: mean1, group: group1}, {mean: mean2, group: group2}] | |
else | |
balance_group(members.shuffle) | |
end | |
end |
You're more than welcome, encouraged—to go ahead and share the news with your friends and loved ones. In order to make it easier for you, we made this incredible link that you can click on to create a tweet announcing the good news.
RubyConf Colombia is our second not-for-profit, community-driven Ruby, Rails and related technologies conference in Medellin, Colombia. The format is two-day conference with a lot of awesome speakers from around the world and locally. The projected attendee number for RubyConf Colombia 2016 is around 250.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetch all the "mapping" from elasticsearch using the enpoint | |
# "/_mapping" and saved them on mapping.json file | |
# curl http://localhost:9200/_mapping | |
# parse the results fetched and saved into mapping.json and we iterate over | |
# the parent index names and start to call the endpoint for delete them | |
require "json" | |
keys = JSON.parse(`curl http://localhost:9200/_mapping`).keys | |
keys.each {|key| `curl -XDELETE http://localhost:9200/#{key}`} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keep.Behaviors.Internationalization = Marionette.Behavior.extend({ | |
initialize: function(){ | |
var currentStore = "us"; | |
var currentView = this[ currentStore + "Behavior"]; | |
if(typeof currentView != "undefined"){ | |
$.extend(true, this.prototype, currentView) | |
} | |
}, | |
templateHelpers: function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SequenceId | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def has_sequence_id(column: "hex_id", sufix: "DBA", rjust_lenght: 3) | |
after_create do | |
number = self.id.to_s(16).rjust(rjust_lenght, "0") | |
self.send("#{column}=", "#{sufix}_#{number}") | |
self.save | |
end | |
end |