Skip to content

Instantly share code, notes, and snippets.

Javier Aranda javierav

Block or report user

Report or block javierav

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
javivelasco /
Last active Feb 19, 2017
Proposal for lightning talk at Reactive Conf 2015

I’m amazed by React and how it’s bringing happiness to our developer lives. I specially like the workflow that integrates Webpack + React + CSS Modules + Babel among other tools and preprocessors. That’s why Javier Jiménez and I are working together in a library called React Toolbox that we would like to show in a lightning talk at Reactive Conference.

The main idea is to create a set of React components implementing Material Design guidelines. There are already some libraries that solve a similar problem but our project is mostly focused on the workflow and best practices to create a tool everybody would want to use. Also, we are sticking to the design guidelines proposed by Google and embracing minimalism by generating the minimum possible amount of HTML and styles to get the best result. Our workflow includes among others:

  • Webpack.
  • ES6 with Babel
  • Unit t
maxivak /
Last active Sep 26, 2019
Integrating Gem/Engine and Main Rails App
kevcha /
Last active Jul 6, 2019
Rails 4 view resolvers

The problem

Using multiple namespaces will require to have also namespaces views. For exemple, if you have an Admin namespace, with a Admin::ProjectsController with a show action that also exists in non namespaced ProjecsController, you cannot render views/projects/show.html.erv from Admin::ProjecsController.

What we want to do

The researched behavior is to try to render the views/admin/projects/show.html.erb, and, if it doesn't exist, fallback to views/projects/show.html.erb

The solution

ekristen /
Last active Aug 1, 2019
Bash Script for Nagios to Check Status of Docker Container
# Author: Erik Kristensen
# Email:
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./ _container_id_
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
branneman /
Last active Oct 15, 2019
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

plentz / nginx.conf
Last active Oct 17, 2019
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
willurd /
Last active Oct 17, 2019
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
machty /
Last active Dec 16, 2015
The smallest possible router refinement.


  1. No longer encourage/allow external calls to a Route's transitionTo method.
  2. Instead, make use of a new routeTo event, with the same semantics as transitionTo, only that it's an event that routes can respond to.
  3. ApplicationRoute will have a default routeTo handler which passes its args to an internal transitionTo.
  4. URL changes will be converted into a routeTo event event.
leviwilson /
Last active Mar 30, 2018
Abstract for Codemash 2014: Automating Windows Applications with Ruby.

Codemash 2014 Pre-Compiler

Automating Windows Applications with Ruby


When we think of writing automated tests with ruby and cucumber, Windows desktop applications are not the first thing that come to mind. If you have looked into writing acceptance tests for Windows applications (native, WinForms or WPF), chances are you have come across solutions such as SpecFlow or Raconteur, but what are the options if we want to drive our tests from ruby using cucumber or RSpec?

This pre-compiler session will take you through building an acceptance test suite using some ruby gems (mohawk, RAutomation and cucumber) that tap into the Microsoft UI Automation accessibility framework to automate native, WinForms and WPF applications.

Target Audience

tomdale / gist:4263171
Created Dec 11, 2012
Ember Data Read-Only API Proposal
View gist:4263171


An important feature for Ember Data is providing helpful error messages when your application tries to do something that is forbidden by the data model.

To that end, we would like for the data model to be able to mark certain records, attributes, and relationships as read-only. This ensures that we can provide errors immediately, and not have to wait for a return trip from the adapter.

This also means that the adapter does not need to handle the case where an application developer inadvertently makes changes to a record that it does not conceptually make sense to modify on the client.


You can’t perform that action at this time.