Skip to content

Instantly share code, notes, and snippets.

View zonuexe's full-sized avatar
🤓
PHP is a Lisp. Emacs is Web.

USAMI Kenta zonuexe

🤓
PHP is a Lisp. Emacs is Web.
View GitHub Profile
!~Filename~:! !Moon's -*-TECO-*- Library!
LUNAR
!& Load Airless Environment:! !S This is my init file
It's here so that comments will get compressed.
Argument is a string which is the user name!
!* process job command line !
hk fj 0,0a-3"E -d' !* remove ^C at end if any!
0,-1a-15."E -2d' !* remove crlf at end if any.!
PHP 7.1.0alpha1 (cli) (built: Jun 28 2016 12:53:16) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.1.0alpha1, Copyright (c) 1999-2016, by Zend Technologies
simple 0.037
simplecall 0.011
simpleucall 0.034
simpleudcall 0.037
mandel 0.140
<?php
function test($init, $key = 'a')
{
$var = $init;
$var[$key] = 1;
echo var_export($init, true), ': ', is_array($var) ? 1 : 0, "\n";
}
test(null); // OK
@zonuexe
zonuexe / AppRunnerSample.php
Last active December 21, 2015 01:22
PHP AppRunner
<?php
/**
* @copyright 2015 pixiv Inc.
* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0
*/
final class AppRunnerSample
{
public static function execute(ControllerTypeBInterface $controller)
{
@zonuexe
zonuexe / phpnet_version_parse.php
Last active December 24, 2015 17:33
php.netのバージョン表記をパースするやつ
#!/usr/bin/env php
<?php
/**
* phpnet_version_parse.php
*
* @author USAMI Kenta <[email protected]>
* @copyright 2015 USAMI Kenta
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
*/
@hanachin
hanachin / double.rb
Last active December 16, 2015 15:32
ブロック中の数値が全て2倍になるメソッド書いてみた
#! ./ruby -I.ext/x86_64-darwin14 --disable-gems
require '-test-/iseq_load/iseq_load'
def double(&block)
iseq_data_magic_index = 0
iseq_data_major_version_index = 1
iseq_data_minor_version_index = 2
iseq_data_format_type_index = 3
iseq_data_misc_index = 4
iseq_data_label_index = 5
@noqisofon
noqisofon / demo-fileutils.scm
Last active September 27, 2015 12:53
( ノ╹◡◡╹)ノ Guile に Gauche の file.util 移植してる
#!/sbin/guile \
-l ./file-utils.scm -l ./std-io.scm -s
!#
(use-modules (srfi srfi-8))
(use-modules (std io))
(use-modules (file util))
(println (current-directory))
(println (home-directory))
(println (absolute-path? (home-directory)))
@takahashim
takahashim / aozora-api.md
Last active March 7, 2021 13:31
青空文庫のAPI化についての資料

青空文庫のAPI化についての資料

勝手にまとめているものです。随時更新中(last update: 2015/05/26)

3行まとめ

  • 現状、公式の「青空文庫API(サーバ)」はなさそう
  • 公式サイトでは作品データのCSVを配布している
  • このCSV等を使った「野良APIサーバ」の試みはあった(今もある)
@shyouhei
shyouhei / gist:0b7dab3e75bfbf96f895
Created March 31, 2015 15:26
新社会人の人が留意すべき事項

新社会人に必須である:

  • 勤務先との書面による「労働契約」。業務委託契約等NG。
  • 多寡を問わず毎月払われる給料。遅配等論外である。
  • 健康保険。
  • 労災保険。
  • 雇用保険。
  • 三六協定。
  • 年次有休。
  • 育児休業の制度があり取得者がいる会社に勤務する。
@nekoruri
nekoruri / donabe.md
Last active February 14, 2024 03:40
まだEmacs使ってるの?「Vim」の方が全然便利ですよ

まだEmacs使ってるの?「Vim」の方が全然便利ですよ

今まで何でEmacs使ってたんだろう…と遠い目をしながら書いてます。

まだEmacs使ってるの?

なんかEmacsを使うことって、暗黙の前提になってますよね。ぼくも一人暮らしをし始めたとき、何の逡巡もなくEmacsを購入してしまいました。確か15MBくらいする牛印のいい感じのヤツです。

でもですね、2年くらい前にEmacsをやめて、Vimにしたんですよ。妻が夜な夜なiPhoneで情報収集をしていたところ、突如Vimに惹かれたらしく、いつの間にか$EDITORにVimが鎮座していました。