Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

ars moriendi horacio

💭
I may be slow to respond.
  • Buenos Aires, Argentina
Block or report user

Report or block horacio

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
@mankind
mankind / rails-jsonb-queries
Last active Dec 6, 2019
Rails-5 postgresql-9.6 jsonb queries
View rails-jsonb-queries
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails
#payload: [{"kind"=>"person"}]
Segment.where("payload @> ?", [{kind: "person"}].to_json)
#data: {"interest"=>["music", "movies", "programming"]}
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json)
Segment.where("data #>> '{interest, 1}' = 'movies' ")
Segment.where("jsonb_array_length(data->'interest') > 1")
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active Nov 29, 2019
What I Wish I'd Known About Equity Before Joining A Unicorn
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@cavi21
cavi21 / mercadolibre_access_token.sh
Created May 4, 2016
Generate an access token for a MercadoLibre Account without the need of doing it through OAuth flow
View mercadolibre_access_token.sh
curl -s -X POST -H 'content-type: application/x-www-form-urlencoded' 'https://api.mercadolibre.com/oauth/token' -d 'grant_type=client_credentials' -d 'client_id=[CLIENT_ID]' -d 'client_secret=[CLIENT_SECRET]'
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active Dec 5, 2019
Multiple MySQL Versions with Homebrew
View multiple_mysql_versions_for_development.md

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

View ruby_revealer.sh
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
View response.md

I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

@pengwynn
pengwynn / backslash.rb
Created Jan 9, 2015
Where I prefer \ to parens in Ruby
View backslash.rb
hash.update \
:name => profile.name,
:company => profile.company,
:blog => profile.blog,
:location => profile.location,
:email => profile.email,
:hireable => profile.hireable,
...
@luislavena
luislavena / howto-manually-add-trust-cert-to-rubygems.md
Last active Dec 8, 2019
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)
View howto-manually-add-trust-cert-to-rubygems.md

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2016-12-01: Please refer to the official guide instead of this process.

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

View gist:20037a488409dd2d7df1
module Enumerable
def each_with_emptiness
return to_enum(__callee__) unless block_given?
if empty?
yield nil, true
else
each do |element|
yield element, false
end
View speedtest.org
DateNameNetworkPlacepingdown mbpsup mbps
22/11/2013Cafe DaltonBuenos Aires183.040.51
23/11/2013Cam24Buenos Aires521.570.49
25/11/2013Alpina SkateBuenos Aires204.941.15
26/11/2013Recoletta HostelBuenos Aires160.950.25
30/11/2013Alvear HostelSSCCordoba294.043.85
01/12/2013SorocabanaCordoba355.522.92
02/12/2013La MoraCordoba319.781.16
02/12/2013LapanaTendaCordoba544.031.15
08/12/2013Alvear HostelFiberte
You can’t perform that action at this time.