Skip to content

Instantly share code, notes, and snippets.

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
/*
Infinite List View
creates <ul> with triggers for infinite scrolling
@author Kevin Jantzer, Blacktone Audio Inc.
@since 2012-11-06
USE - listen for:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled</title>
<style>
#example {
background: #f00;
width: 300px;
height: 300px;
@lexeek
lexeek / app.js
Created September 15, 2013 21:11 — forked from pixelhandler/app.js
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@lexeek
lexeek / gist:6407850
Created September 1, 2013 22:54 — forked from mcs/gist:4059304
/**
* Creates a log wrapper for browser console. If console.log is defined, it passed the function arguments to it.
* Using this method prevents problems when using console.log directly in IE (at least in version 8).
*/
var logger = function () {
if (console && console.log) {
console.log.call(console, arguments);
}
}