Skip to content

Instantly share code, notes, and snippets.

@rochoa
rochoa / ImageMagick 6.6.9-10 Homebrew Formula.md
Last active August 29, 2015 13:58
Homebrew Formula for ImageMagick 6.6.9-10

Homebrew Formula patching old ImageMagick release 6.6.9-10

Install

$ brew install https://gist.githubusercontent.com/rochoa/10006522/raw/9e3ffb85bbc897ec7608b710ce58196d0ee86d43/imagemagick.rb

Tested

@rochoa
rochoa / ImageMagick 6.7.7-10 Homebrew Formula.md
Last active March 11, 2021 13:48
Homebrew Formula for ImageMagick 6.7.7-10

Homebrew Formula patching old ImageMagick release 6.7.7-10

Install

$ brew install https://gist.githubusercontent.com/rochoa/10017167/raw/f4f09fd9f9441513d06092c881e10935735881e2/imagemagick.rb

Tested

@rochoa
rochoa / ant.rb
Created May 30, 2014 14:14
Apache Ant Homebrew Formula with hardcoded URL
require 'formula'
class Ant < Formula
homepage 'http://ant.apache.org/'
url 'http://www.us.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.tar.gz'
sha1 '6c41481e8201f6b3f7e216146b95bb6de70208bb'
bottle do
cellar :any
sha1 "56eee6f32ab55854b1ccbaa3e106129517e94f7f" => :mavericks
@rochoa
rochoa / Redis 2.6.x Brew Formula.md
Last active August 29, 2015 14:02
Homebrew Formula for Redis 2.6.6
@rochoa
rochoa / Varnish 2.1.x Brew Formula.md
Created June 20, 2014 16:22
Homebrew Formula for Varnish 2.1.5
@rochoa
rochoa / algorithms.js_vs_native_sort.md
Last active August 29, 2015 14:05
native sort vs algorithms quicksort in different node versions

Check the conversation here https://twitter.com/felipernb/status/499661739244281859

As Felipe mentions native sort covers many edge cases so native method is less performant. However I get totally different results using node.js in different versions, check results_node_* files.

Some edge cases, see tests.js file:

  • Sorting [1, null] produces different result in native than in algorithms.js.
  • ['a', null, 'a'] produces inconsistent results in algorithms.js.
@rochoa
rochoa / npm-shrinkwrap-regression.md
Last active November 6, 2015 12:37
npm shrinkwrap regression

There is a regression between versions 1.2.0 and 1.2.1 of npm when generating npm-shrinkwrap.json from >=1.2.1 and using it with <1.2.1

Steps to reproduce

nvm use 0.8.18 # this uses npm@1.2.2 but regression was introduced in npm@1.2.1
npm install
npm shrinkwrap

rm -rf node_modules/

requirements

  • gdal (and python bindings)
  • cartodb up and running
    • it would be nice to use ghost tables branch (CDB-2572) so it can get tables into the dashboard. requires resque to be running also.

quick start

# Download shaded relief from natural earth (http://www.naturalearthdata.com/downloads/10m-raster-data/10m-shaded-relief/)
make prepare
#!/bin/bash
# Configuration #############################################
# For Slack tokens go to https://api.slack.com/#auth
SLACK_TOKEN=""
# In seconds
AWAY_AFTER=120
CHECK_EVERY=10
@rochoa
rochoa / index.html
Last active March 16, 2017 12:59
[CARTO] Filter labels for different zoom levels
<!DOCTYPE html>
<html>
<head>
<title>Leaflet multilayer example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;