Skip to content

Instantly share code, notes, and snippets.

View willert's full-sized avatar

Sebastian Willert willert

  • Göttingen, Germany
View GitHub Profile
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d878d0 (LWP 8586)]
0x08076f9e in Perl_pad_swipe ()
(gdb) bt
#0 0x08076f9e in Perl_pad_swipe ()
#1 0x08067775 in Perl_op_clear ()
#2 0x080658e6 in Perl_op_free ()
#3 0x0806591a in Perl_op_free ()
#4 0x0806591a in Perl_op_free ()
#5 0x0806591a in Perl_op_free ()
---
title: Willkommen bei Stress im Griff, Max Mustermann
layout: default
order: 2
---
{{> header}}
{{> main-nav}}
@willert
willert / mistfile
Created December 20, 2013 12:06
Possible new mist config format
# ask perlbrew or perlenv to default to a specific version of perl
perl '5.14.2';
assert {
# check some system wide prereqs on install time here
};
prepend 'ExtUtils::MakeMaker' => "6.30";
# skip testing for those distributions
@willert
willert / Autocomplete.pm
Created November 20, 2013 18:13
Test with stash instead of content_lacks
package Search::Autocomplete;
use 5.014;
use Test::Able;
use Test::More;
use Data::Dumper;
use JSON::XS qw/ decode_json /;
use utf8;
# order is important!
sub ingredient : Chained(base) {
my ( $self, $ctx, $query_string, @rest ) = @_;
$query_string = join( q{/}, $query_string, @rest ) if @rest;
$query_string =~ s/\W+/ /g; # <-- da kommt dein sanitizer hin
my @suggestions;
goto RETURN_SUGGESTIONS unless $query_string;
@willert
willert / foo
Created November 20, 2013 13:47
Autocomplete
sub ingredient : Chained(base) {
my ( $self, $ctx, $query_string, @rest ) = @_;
$query_string = join( q{/}, $query_string, @rest ) if @rest;
my $system = $ctx->model->system('Ernaehrungscoach::Initialdiagnose');
my $db = $system->blank_case_object_for( $ctx->user );
my $case = $db->create_case_object( import => [
$ctx->user, 'Ernaehrungscoach::Situation'
]);
my $results = $system->interpreter->evaluate( $case );
my $report = Exparse::Report->new({
generator => $system->generator,
results => $results,
});
(defun git-commit-insert-header (type name email &optional note)
(let* ((signoff-at (git-commit-find-pseudo-header-position))
(prev-line (save-excursion
(goto-char (- signoff-at 1))
(thing-at-point 'line)))
(pre (if (or (string-match "^[^\s:]+:.+$" prev-line)
(string-match "\\`\s*$" prev-line))
"" "\n"))
(has-content (stringp note))
(insert (lambda ()
(defun git-commit-insert-header (type name email &optional note)
(let* ((signoff-at (git-commit-find-pseudo-header-position))
(prev-line (progn
(save-excursion
(goto-char (- signoff-at 1))
(thing-at-point 'line))))
(pre (if (or (string-match "^[^\s:]+:.+$" prev-line)
(string-match "\\`\s*$" prev-line))
"" "\n"))
(org (pointer)))
(let ((redo t))
(while redo
(goto-char (+ start 1))
(setq redo nil)
(let* ((this-block (sbw/ab-get-containing-block (point)))
(start-of-block (pop this-block))
(end-of-block (pop this-block)))
(mapcar
(lambda (this)