Skip to content

Instantly share code, notes, and snippets.


Daniel Grijuela dgrijuela

  • Madrid, Spain
Block or report user

Report or block dgrijuela

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
paulirish /
Last active Oct 24, 2019
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()

Running web server in Clojure

Install Boot build tool: brew install boot-clj.

For JS people: Boot has a notion of tasks, so it's kind of similar to Grunt/Gulp.

build.boot is yours package.json and gulpfile.

ring-jetty-adapter provides Java's Jetty web framework, compojure is a routing library and hiccup is a lib for writing HTML. The task is defined using deftask macro, it runs run function which we :refer to.

jamielob / Meteor IOS facebook login guide.markdown
Last active Apr 8, 2017
Meteor cordova ios facebook login
View Meteor IOS facebook login guide.markdown

How to get facebook login working with Meteor and Cordova on iOS

Step 1: Make your local dev site internet accessible

Because there is an issue with OAuth2 login and localhost development, you currently have to deploy your meteor site to be able to test the Facebook login. A nice little workaround for this is to make the local instance of meteor accessible externally.

There is a great online guide for setting up port forwarding with your router and you can check your public external IP here.

For example, If you have an Apple router, simply open up Airport Utility on your Mac and click edit on your router, then go to the Network tab. Under Port Settings click the + icon and select Personal Web Sharing, setting all of the public and private ports to 3000. Make sure the private IP is set to your current computer IP.


NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.

I'd like to hear how you approach this: @valuedstandards or comment on this gist.

The issue

You have to include a boatload of link elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':

![Touch Icon Links](

MFQ / gist:a308a8f05bb87b78c756
Created Apr 2, 2015
Mobile-config.js for meteor
View gist:a308a8f05bb87b78c756{
name: 'Todos',
description: 'A simple todo list app built in Meteor.',
author: 'Percolate Studio Team',
email: '',
website: '',
version: '0.0.1'
fuzzyalej / functional_javascript.js
Last active Aug 29, 2015
Functional JS Workshop
View functional_javascript.js
function cell(value) {
return {
value: value,
next: null //null is cool
function cons(value, list) {
var tmp = cell(value); = list || null;
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
krasnoukhov /
Last active Sep 28, 2019
Profiling memory leaky Sidekiq applications with Ruby 2.1

My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.

As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.

I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.

So, in order to profile your worker, add this to your Sidekiq configuration:

You can’t perform that action at this time.