Skip to content

Instantly share code, notes, and snippets.

View matthiasg's full-sized avatar

matthiasg matthiasg

View GitHub Profile
@matthiasg
matthiasg / INSTALL.md
Last active August 29, 2015 14:07
Compile zbar on SmartOS (works against JPEG! but not PNGs)

Tested:

SmartOS BaseImage: 20150219T102159Z Zone Image: b451ca78-1ca5-11e4-8a4c-5f463f94e8f1 (elasticsearch 14.2.0 smartos 2014-08-05T13:37:54Z)

Source:

Download zbar source from: http://zbar.sourceforge.net/download.html => zbar-0.10.tar.bz2 Download imagemagick source from: http://www.imagemagick.org/download/ImageMagick.tar.gz => ``

# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##################################################################
Installing and Configuring SmartOS on a budget server (with a /29)
##################################################################
# if you find this gist useful, please star it
# please be aware that budget hosting companies usually cut corners somewhere,
'use strict';
// Karma configuration
// Generated on Fri Mar 14 2014 13:38:47 GMT+0100 (W. Europe Standard Time)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '../..',

on the guest SmartOS VM

pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image

on the global zone

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@matthiasg
matthiasg / readme.md
Created January 2, 2014 12:17
compiling tesseract on smartos/solaris
  • download source

  • after installing leptonica with make install

  • export LIBLEPT_HEADERSDIR=/usr/local/include/leptonica

  • export C_INCLUDE_PATH=/opt/local/include

  • export CPLUS_INCLUDE_PATH=/opt/local/include

  • ./configure --with-extra-libraries=/usr/local/lib

    You can now build and install tesseract by running:

$ make

@matthiasg
matthiasg / readme.md
Last active January 1, 2016 23:29
compile leptonica on smartos/solaris
  • download/unpack source
  • make sure gcc is installed via pkgin
  • make sure set displays CFLAGS=-D__SOLARIS__. If it doesn't run export CFLAGS=-D__SOLARIS__. that way the gcc compiler gets that define which helps compiling (otherwise it will fail at the end due to differences in file management)
  • LIBS="-ljpeg -lz" configure NOTE: This will make tiff files work, but i could not yet get pngs to work. configure is still complaining and adding -lpng did not have any effect other than stopping the configure early
  • make
  • make install to install
var https = require("https");
var curaUrl = "https://packages.curasystems.com/packages/datepicker-for-angular?version=0.0.2";
var googleUrl = "https://google.de";
var options = {
strictSSL: false
};
#!/usr/bin/env python
"""
Math extension for Python-Markdown
Copied from http://freewisdom.org/projects/python-markdown/mdx_math for preservation.
The following description was attached by the author:
> This is a quick and dirty implementation of allowing <math> LaTeX </math> to do