Skip to content

Instantly share code, notes, and snippets.

View zheileman's full-sized avatar

Jesus Laiz zheileman

  • London / Madrid
View GitHub Profile
@zheileman
zheileman / git-crypt-stuff.sh
Last active February 28, 2022 14:19
Git-crypt and GPG stuff
# List my keys:
gpg --list-keys
# Search and import a key:
gpg --search-keys [email or key ID]
# Trust a key
gpg --edit-key ID
trust
5 = I trust ultimately
@zheileman
zheileman / timeago_rails_helper.rb
Created February 6, 2012 10:04
jQuery timeago rails helper
# This will work together with this jQuery timeago plugin fork:
# https://github.com/zheileman/jquery-timeago
# Please note the original jQuery timeago plugin use the 'title' to store the timestamp.
# This forked version use a 'data-time' attribute to store the timestamp and have
# a configurable setting to enable/disable overwriting the title with tag's content.
#
# $.timeago.settings.overwriteTitle = [true|false]
def js_timeago(time, options = {})
css_classes = (options.delete(:class) || "").strip.split | ["timeago"]
@zheileman
zheileman / install_jruby.sh
Created January 25, 2012 10:07
Installing JRuby 1.6.5.1 / Ruby 1.9.2 on Mac OSX Lion with RVM
# Make sure to use RVM latest version
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# You can check which known versions has RVM (make sure you can see jruby[-1.6.5.1])
rvm list known
# To install JRuby 1.6.5.1
rvm install jruby
# To start using it (with Ruby 1.9.2 instead of 1.8.7)