Skip to content

Instantly share code, notes, and snippets.

@Su-Shee
Su-Shee / gist:daf445034122d501dbec
Created March 24, 2015 17:20
unclutter vim files
set undofile
set backupdir=~/.vim/backups// " Where backups will go.
set undodir=~/.vim/undos// " Where undofiles will go.
set directory=~/.vim/tmp// " Where temporary files will go.
  1. General Background and Overview
@Su-Shee
Su-Shee / gist:6f17bb5b38c28c101575
Created May 23, 2015 13:39
Königsberger Klopse (Meatballs)
Königsberger Klopse
* 600gr minced meat, pork/beef, rolled as little balls
* half a handful of capers
* 1/2 - 1 lemon (juice)
* anchovis paste or in salt
* heavy cream (1 cup)
* fond or broth (beef,chicken) (1 cup)
gently light brown the meat balls in butter. add some ground nutmeg and pepper on them - but NO SALT!
@Su-Shee
Su-Shee / gist:450ccbf2f665094aae50
Last active August 29, 2015 14:23
quick & dirty vim syntax highlighting for "bad writing style" in german
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" indication for missing a proper subject or object 'who is doing what?'
syn keyword authorAnonym man
on a specific date
at a specific time
every n months, weeks, days
every n hours, minutes
every nth month, week, day
every nth hour, minute
every nth month of year
#!/usr/bin/env perl
use Toadfarm -init;
mount './users/script/users' => {
mount_point => "/users",
};
mount './communication/script/communication' => {
mount_point => "/communication",
[Tue Jul 7 13:11:19 2015] [debug] Mojo::IOLoop {
Parents Mojo::Base
public methods (23) : accept_interval, acceptor, client, DEBUG, delay, is_running, lock, max_accepts, max_connections, multi_accept, next_tick, one_tick, reactor, recurring, remove, reset, server, singleton, start, stop, stream, timer, unlock
private methods (9) : _accepting, _id, _instance, _not_accepting, _recurring, _remove, _stop, _stream, _timer
internals: {
accept "78955751431ea7415817779bd8d3b056",
accept_interval 0.025,
acceptors {
d05fdcc7c32d7c73e0d7cbbc717a708d Mojo::IOLoop::Server
},
I have a cheap validation regex for UUIDs on routes - mostly to distinguish :stuff
my $uuid = qr/[[:xdigit:]]{8}-([[:xdigit:]]{4}-){3}[[:xdigit:]]{12}/;
I use it like so:
$r->get('/comments/:object' => [ object => $uuid ])
->to('comments#list_by_item');
or, like this:
#server
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use ZMQ::LibZMQ4;
use ZMQ::Constants qw/:all/;
@Su-Shee
Su-Shee / gist:159affbedef20f0b7a01
Last active October 19, 2015 19:38
my hommus recipe
USE HOME-COOKED CHICKPEAS AS BASE. NOT THE STUFF FROM CANS.
cook chickpeas without anything. they freeze well, so make as much as you want. cook them SOFT.
roughly:
* 1 cup of chickpeas
* 2-3 spoons of tahin
* 2-3 spoons of olive oil
* 2-4 spoons of lemon juice (to taste, I like with more)