Skip to content

Instantly share code, notes, and snippets.

View lguardiola's full-sized avatar

Luis E. Guardiola lguardiola

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lguardiola on github.
  • I am lguardiola (https://keybase.io/lguardiola) on keybase.
  • I have a public key ASBtq-FJcULQfSO8r-bxQ4hyod4g7He32zgfZjWIxVHyFwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am lguardiola on github.
  • I am lguardiola (https://keybase.io/lguardiola) on keybase.
  • I have a public key ASCtTbEYAvh3dLs3c-XY3Z0-BqmMXkLquSqafiXWmKM8Lgo

To claim this, I am signing this object:

lguardiola@MacBook-Pro:~/Code/intern-examples/react-example|master
⇒ npm test
> react-intern-example@0.1.0 test /Users/lguardiola/Code/intern-examples/react-example
> intern-runner config=tests/intern
PASS: main - todoModel - default data (2ms)
PASS: main - todoModel - complete (empty model) (2ms)
0/2 tests failed
PASS: main - footer - construction (1ms)
@lguardiola
lguardiola / testHook.js
Created August 20, 2015 15:55
My first hook.io microservice
module['exports'] = function simpleHttpRequest (hook) {
// npm modules available, see: http://hook.io/modules
var request = require('request');
request.get('http://httpbin.org/ip', function(err, res, body){
if (err) {
return hook.res.end(err.messsage);
}
hook.res.end(body);
})
};
@lguardiola
lguardiola / Dockerfile
Last active August 29, 2015 14:25 — forked from inkel/Dockerfile
FROM alpine:3.2
MAINTAINER Leandro López <inkel.ar@gmail.com>
# Install base packages
RUN apk update && apk upgrade
# Install ruby and ruby-bundler
RUN apk add curl-dev ruby-dev build-base ruby
# Clean APK cache
"some line shorter than 80 characters"
"some line longer than 80 characters some line longer than 80 characters some line longer than 80 characters"
10.times do |i|
puts i
end
puts DATA.read
__END__
This is
a data content!
@lguardiola
lguardiola / date_ext.rb
Created October 16, 2012 17:52
Date extension to calculate diff in years between two dates
# override date class
class Date
def self.years_from(date)
r = today.year - date.year
r-=1 if today.month < date.month
r-=1 if today.month == date.month && today.day < date.day
r
end
end
@lguardiola
lguardiola / ree-1.8.7-glibc+2.14.patch
Created April 5, 2012 19:50
Patch to compile Ruby Enterprise Edition 1.8.7 for glibc >= 2.14
diff --git a/distro/google-perftools-1.7/src/tcmalloc.cc b/distro/google-perftools-1.7/src/tcmalloc.cc
index 8d94d20..0769425 100644
--- a/distro/google-perftools-1.7/src/tcmalloc.cc
+++ b/distro/google-perftools-1.7/src/tcmalloc.cc
@@ -137,6 +137,13 @@
# define WIN32_DO_PATCHING 1
#endif
+// GLibc 2.14+ requires the hook functions be declared volatile, based on the value of the
+// define __MALLOC_HOOK_VOLATILE. For compatibility with older/non-GLibc implementations,
# encoding: utf-8
Encoding.default_internal = "UTF-8"
Encoding.default_external = "UTF-8"
=begin
REFERENCES
ticket: https://www.pivotaltracker.com/story/show/20034615