Skip to content

Instantly share code, notes, and snippets.

View a-yasui's full-sized avatar
🐆
にゃおす

a.yasui a-yasui

🐆
にゃおす
View GitHub Profile
@a-yasui
a-yasui / httpd.conf
Last active December 28, 2015 20:29
MAMP.cwd の brew apache2 バージョン
# /usr/local/Cellar/etc/apache2/httpd.conf
ServerRoot "/usr/local/Cellar/httpd/2.2.25"
Listen 8888
LoadModule authn_file_module libexec/mod_authn_file.so
LoadModule authn_dbm_module libexec/mod_authn_dbm.so
LoadModule authn_anon_module libexec/mod_authn_anon.so
LoadModule authn_dbd_module libexec/mod_authn_dbd.so
LoadModule authn_default_module libexec/mod_authn_default.so
LoadModule authz_host_module libexec/mod_authz_host.so
LoadModule authz_groupfile_module libexec/mod_authz_groupfile.so
@a-yasui
a-yasui / PHP53.log
Created October 17, 2013 03:53
PHP5.5/PHP5.3 にて、連想配列とSwitchのパフォーマンス比較。結果的にはswitchの方が速く、PHP55の方が速いですよっと。
$ /usr/local/Cellar/php53/5.3.27/bin/php switch_or_array.php
start arr ... Finish: 10.038110971451
start sw ... Finish: 6.0564711093903
@a-yasui
a-yasui / loop_reader.php
Last active December 19, 2015 05:08
AMQP/RabbitMQ めも
<?php
/** 兎に角ループさせる */
while (true) {
echo " [x] If you wanna stop, you push Ctrl-C","\n";
require("reader.php");
sleep(1);
}
@a-yasui
a-yasui / .tmux.conf
Created June 25, 2013 09:16
僕の .tmux.conf
set-option default-shell /bin/zsh
# Prefix
set-option -g prefix C-z
# 日本語環境なら必須??
setw -g utf8 on
set -g status-utf8 on
# status
@a-yasui
a-yasui / shiritori.scala
Created April 13, 2013 09:49
たかし君からの問いかけ、その2
/**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0225
*
* 回文問題
*
* #scala_kansai_beginners
*/
var buff = List(
"apple",
@a-yasui
a-yasui / gist:5282873
Created April 1, 2013 02:19
XDebug with sublime text 2
メモ書き
----------
Xdebug:
------
Xdebug 2012.06.13 Changelog
===========================
@a-yasui
a-yasui / form.php
Created February 10, 2013 16:12
サーミスタとEthernetを使ったテスト
<?php
$form = "";
function write ($temp) {
$path = "temp.txt";
$fp = fopen($path, "a");
if ($fp) {
$time = time();
fwrite($fp, "$time\t$temp\n");
fclose($fp);
@a-yasui
a-yasui / gist:4585010
Created January 21, 2013 10:05
Project Euler Problem 1 Erlang...
1> lists:sum([X || X <- lists:seq(1, 999), X rem 3 == 0 orelse X rem 5 == 0]).
233168
@a-yasui
a-yasui / MAMPcwd
Last active December 9, 2015 20:28 — forked from anonymous/gist:4323676
MAMP subtool コマンドラインで DocumentRoot を現在の作業ディレクトリに変更して再起動します # 間違ってanonymousで書いてもうたよ…
#!/bin/sh
# -*- coding: utf_8 -*-
#
# MAMPcwd (start|stop|cwd)
# MAMP のコマンドライン補佐ツール
#
# start: 再起動/起動をします
# stop : 停止します
# cwd : コマンドを実行したディレクトリをDocumentRootにして、再起動をします
#
@a-yasui
a-yasui / for.c
Created November 29, 2012 10:17
C99 for loop
/* gcc -std=c99 -o for for.c
*
* -std=c99 で c99 文法としてコンパイル
* ex: http://seclan.dll.jp/c99d/
*/
#include <stdio.h>
int
main (void)
{