This file contains 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
#unbind C-b | |
#set -g prefix C-b | |
# allow mouse | |
# set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# set -g mode-mouse on # alternatve way | |
set -g mode-mouse off | |
# better window split behavior | |
unbind '%' |
This file contains 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
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
This file contains 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
palette () | |
{ | |
echo -en "\n + "; | |
for i in {0..35}; | |
do | |
printf "%2b " $i; | |
done; | |
printf "\n\n %3b " 0; | |
for i in {0..15}; | |
do |
This file contains 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
<?php | |
/** | |
* Macro to backport enum from the future | |
*/ | |
macro { | |
enum T_STRING·name { | |
·ls | |
( | |
·rtoken('/^\w+$/')·field |
This file contains 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
--TEST-- | |
Non delimited layer matching | |
--FILE-- | |
<?php | |
macro { | |
(T_STRING·A ···rest) // matches a lisp form | |
} >> { | |
T_STRING·A(···rest) | |
} |
This file contains 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
T_INCLUDE | |
T_INCLUDE_ONCE | |
T_EVAL | |
T_REQUIRE | |
T_REQUIRE_ONCE | |
T_LOGICAL_OR | |
T_LOGICAL_XOR | |
T_LOGICAL_AND | |
T_INSTANCEOF | |
T_NEW |
This file contains 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
<?php declare(strict_types=1); | |
function crunch_data(array $data, callable(int $left, int $right): int $callback): array { | |
$result = []; | |
foreach($data as $left => $right) $result[] = $callback($left, $right); | |
return $result; | |
} | |
$crunched = crunch_data([1 => 2, 3 => 4], function(int $left, int $right): int { |
This file contains 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
callable_arg_type_list: | |
/* empty */ { $$ = NULL; } | |
| '(' ')' { $$ = zend_ast_create_list(0, ZEND_AST_PARAM_LIST); } | |
| T_INT_CAST { | |
zval zv; | |
ZVAL_STRINGL(&zv, "int", sizeof("int")-1); | |
zend_ast *type = zend_ast_create_zval_ex(&zv, ZEND_NAME_NOT_FQ); | |
zend_ast *arg = zend_ast_create_ex(ZEND_AST_PARAM, 0, type, NULL, NULL); | |
zend_ast *args = zend_ast_create_list(0, ZEND_AST_PARAM_LIST); | |
zend_ast_list_add(args, arg); |
This file contains 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
--TEST-- | |
Opaque types with macros that generate other macros :> | |
--FILE-- | |
<?php | |
macro { | |
type T_STRING·newtype = T_STRING·basetype; | |
} >> { | |
macro { T_STRING·newtype } >> { T_STRING·basetype } | |
} |
OlderNewer