http://www.oracle.com/technetwork/articles/servers-storage-dev/oom-killer-1911807.html
See example in the sources of OpenSSH.
| /* | |
| * levmarq.c | |
| * | |
| * This file contains an implementation of the Levenberg-Marquardt algorithm | |
| * for solving least-squares problems, together with some supporting routines | |
| * for Cholesky decomposition and inversion. No attempt has been made at | |
| * optimization. In particular, memory use in the matrix routines could be | |
| * cut in half with a little effort (and some loss of clarity). | |
| * | |
| * It is assumed that the compiler supports variable-length arrays as |
| let (=>) left right = print_char (if left = right then '.' else 'F') | |
| open Printf | |
| let id x = x | |
| let const x = fun _ -> x | |
| let sum = List.fold_left (+) 0 | |
| let (>>) f g x = g (f x) | |
| let () = |
| sudo apt-get install imagemagick | |
| # To rename files with spaces: | |
| find -name "* *" -type f | rename 's/ /_/g' | |
| ls page*.png | sort -n | tr '\n' ' ' | sed 's/$/\ mydoc.pdf/' | xargs convert |
http://www.oracle.com/technetwork/articles/servers-storage-dev/oom-killer-1911807.html
See example in the sources of OpenSSH.
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
| var net = require('net') | |
| var sock = net.connect(1337) | |
| process.stdin.pipe(sock) | |
| sock.pipe(process.stdout) | |
| sock.on('connect', function () { | |
| process.stdin.resume(); | |
| process.stdin.setRawMode(true) |
| var Location = (function LocationClosure(){ | |
| var properties = {}; | |
| // Create and return a link with the given URI | |
| function makeLink( URI ){ | |
| var link = document.createElement( 'a' ); | |
| link.href = URI; | |
| return link; |
| 'use strict'; | |
| var m = require('mithril'); | |
| var extend = require('lodash').extend; | |
| var setFocus = require('../util/viewhelper').setFocus; | |
| var keymage = require('keymage'); | |
| function noop(){} | |
| function addClass(el, className) { |
| /** | |
| * JSX version of https://github.com/jpmonette/todomvc-mithril/blob/1d627f1d5dc0890d0a99cdcb16d09387f68f6df0/js/views/todo-view.js | |
| * Assumes the use of the vanilla JSX Transformer and an "mshim" object to translate tag calls to the format m() expects. | |
| * @jsx mshim | |
| */ | |
| 'use strict'; | |
| var m = require('mithril') |
| // If you need a license, this is under the ISC license. | |
| // In golfed ES6, just because I could... (84 characters) | |
| this.m=(o=>Object.assign((...a)=>(typeof a[0]=='string'?o:o.component)(...a),o))(m); |