This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from mongrel2 import handler | |
| import json | |
| from uuid import uuid4 | |
| REDIRECT_TO="https://example.com" | |
| REDIRECT_BODY='<html><head><title>Moved</title></head><body><h1>Moved</h1><p>This page has moved to <a href="%s">%s</a>.</p></body></html>'%(REDIRECT_TO,REDIRECT_TO) | |
| # ZMQ 2.1.x broke how PUSH/PULL round-robin works so each process | |
| # needs it's own id for it to work | |
| sender_id = uuid4().hex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun tcl-escape (string) | |
| (let* ((strings | |
| (split-sequence #\} string)) | |
| (strings (split-sequence #\{ | |
| (format nil "~a~{\\}~a~}" (car strings) (cdr strings))))) | |
| (format nil "{~a~{\\{~a~}}" (car strings) (cdr strings)))) | |
| (defun move-cursor (widget row col) | |
| (format-wish "~a mark set insert ~a.~a" (widget-path widget) row col)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sys-apps/cracklib-words: | |
| pkg.installed: | |
| - refresh: False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::io; | |
| enum List { | |
| Cons(uint,~List), | |
| Nil() | |
| } | |
| fn cons(x : uint, l : ~List) -> ~List{ | |
| return ~Cons(x,l); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum List { | |
| Cons(uint,~List), | |
| Nil() | |
| } | |
| fn truncateAtValue(v : uint, mut l: &mut~List) { | |
| //loop { | |
| match l { | |
| &~Cons(x, ref mut next) if x == v => { | |
| *next = ~Nil; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::io; | |
| use std::util; | |
| enum List { | |
| Cons(uint,~List), | |
| Nil() | |
| } | |
| fn cons(x : uint, l : ~List) -> ~List{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/git-svn.perl b/git-svn.perl | |
| index 34884b8..5ef4532 100755 | |
| --- a/git-svn.perl | |
| +++ b/git-svn.perl | |
| @@ -3491,11 +3491,41 @@ sub rebuild_from_rev_db { | |
| unlink $path or croak "unlink: $!"; | |
| } | |
| +BEGIN { | |
| + my @data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * Messages for package app-editors/nvi-1.81.6-r3: | |
| * Failed Patch: nvi-1.81.6-db44.patch ! | |
| * ( /usr/portage/app-editors/nvi/files/nvi-1.81.6-db44.patch ) | |
| * | |
| * Include in your bugreport the contents of: | |
| * | |
| * /var/tmp/portage/app-editors/nvi-1.81.6-r3/temp/nvi-1.81.6-db44.patch.out | |
| * ERROR: app-editors/nvi-1.81.6-r3::gentoo failed (prepare phase): | |
| * Failed Patch: nvi-1.81.6-db44.patch! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; Mongrel2 Exchange | |
| ;;; Example of an adpater to allow load-balancing and session locking | |
| (in-package :mymongrel2) | |
| (defun main-loop (m2addr req-rep-addr) | |
| (ensure-zmq-init) | |
| (let* ((pull-socket (zmq:socket *zmq-context* zmq:PULL)) | |
| (rep-socket (zmq:socket *zmq-context* zmq:REP))) | |
| (zmq:connect pull-socket m2addr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::io; | |
| use std::util; | |
| enum List { | |
| Cons(uint,~List), | |
| Nil() | |
| } | |
| fn cons(x : uint, l : ~List) -> ~List{ |