Skip to content

Instantly share code, notes, and snippets.

View matthiasg's full-sized avatar

matthiasg matthiasg

View GitHub Profile
@matthiasg
matthiasg / readme.md
Created February 21, 2013 12:54
smartos, reconfigure sata drive on the fly

cfgadm to list drives

[root@54-04-a6-91-2b-27 /opt]# cfgadm
Ap_Id                          Type         Receptacle   Occupant     Condition
sata0/0::dsk/c2t0d0            disk         connected    configured   ok
sata0/1::dsk/c2t1d0            disk         connected    configured   ok
sata0/2::dsk/c2t2d0            disk         connected    configured   ok
sata0/3::dsk/c2t3d0            disk         connected    configured   ok
sata1/0::dsk/c0t0d0            disk         connected    configured   ok

sata1/1::dsk/c0t1d0 disk connected configured ok

@matthiasg
matthiasg / docs style (bootstrap)
Created August 5, 2013 06:26
the callouts from the bootstrap documentation
/* Side notes for calling out things
-------------------------------------------------- */
/* Base styles (regardless of theme) */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
#!/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
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
};
@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
@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

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

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

'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: '../..',