Skip to content

Instantly share code, notes, and snippets.

@ludo
ludo / pex_install_postgis_workarounds.md
Last active February 28, 2021 20:36 — forked from skissane/pex_install_postgis_workarounds.md
Solutions and workarounds for issues with "pex install postgis" (assuming macOS+Homebrew)

Problem: configure: error: could not find libxml2
Solution: sudo xcode-select -s /Library/Developer/CommandLineTools

Problem: configure: error: could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter
Solution: brew install geos

Problem: configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
Solution: brew install proj and then CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H pex install postgis

Problem: configure: error: gdal-config not found. Use --without-raster or try --with-gdalconfig=\

@ludo
ludo / README.md
Created May 3, 2019 15:44 — forked from int128/README.md
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

@ludo
ludo / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ludo
ludo / utf8mb4helper.rb
Created November 19, 2014 20:42
Source: @kadkins @ https://github.com/brianmario/mysql2/issues/367. Usage: Copy and paste into utf8mb4helper.rb and alter the settings in top of the script and then run ruby utf8mb4helper.rb > utf8mb4helper.sql
# ruby script to generate ddl statements to convert utf8 to utf8mb4
# you will need ruby, rubygems and the mysql2 gem to run this script
# => gem install mysql2 --no-rdoc --no-ri
require 'rubygems'
require 'mysql2'
### settings
dbhost='localhost'
dbuser='root'
dbuserpwd='password'

Keybase proof

I hereby claim:

  • I am ludo on github.
  • I am ludois (https://keybase.io/ludois) on keybase.
  • I have a public key whose fingerprint is 9837 D0EA CEEC 1824 876F FF5A D2E1 B603 8B63 3D4D

To claim this, I am signing this object:

function log {
echo -e "\033[1;31m>> \033[0;34m$*\033[0m"
}
function error {
echo -e "\033[1;31m!! \033[1;31m$*\033[0m"
}
function ask {
echo -e "\033[1;32m?? \033[0;32m$*\033[0m"
}
function pause {
@ludo
ludo / kickstart
Created September 6, 2012 08:05
Ubuntu 12.04 kickstart script
lang en_US
langsupport en_US
keyboard us
timezone Etc/UTC
text
install
skipx
halt
# Ridiculous URL... I know...
@ludo
ludo / dynamic-tree.js
Created June 18, 2012 18:34
Dynamically adding row to a jQuery treeTable
// 1) Removed 'tabindex' (tabindex is something you probably use locally?).
// 2) Removed class="initialized", I don't think it is necessary.
var html_row = '<tr id="node-inserted-1">';
// 3) Removed class ui-draggable. It should be added by jQuery draggable
// plugin.
html_row += '<td><span class="file">Simple element inserted after</span></td>';
html_row += '<td>4 KB</td>';
html_row += '<td>Plain text</td>';
html_row += '</tr>';