鶏白湯ラーメン
函南町にある鶏白湯スープメインのラーメン屋のもかすけさんで食べてきました。
鶏だしのスープはあっさりしていて美味しかったです、油多めのしっとりした感じのチャーシュウでスープとマッチしてバランスが良いなって感じのラーメンでした。
ちなみに醤油ラーメンも食べましたが、私的にはあまりイけていませんでした。
そのほかまだ豚骨系の種類もあるので、再度食べてみたいとおもいます。
karky7 ~ # emerge app-emulation/wineこれだけです、そしたら「Kindle for PC(Windows8.1,8,7)」をダウンロードしてインストールする
cuomo@karky7 ~ $ wine ~/Downloads/exe/KindleForPC-installer.exeデスクトップにアイコンが出ました、HOMEディレクトリの.wine以下にインストールされます
CFLAGS="-O2 -ggdb -pipe"
FEATURES="${FEATURES} splitdebug nostrip"
それから以下のファイルに、先ほど書いたファイル名のパッケージ名の次に書くsys-libs/glibc debug-cflagsそしたら、debug付きでglibcをビルドする
karky7 ~ # USE="debug" emerge sys-libs/glibcこれで、デバック情報の追加されたglibcが展開されます
karky7 ~ # ebuild /usr/portage/sys-libs/glibc/glibc-2.17.ebuild unpack * glibc-2.17.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * glibc-2.17-patches-8.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... ... ... ...そのまま自分のhomeへコピー、そのままでもいいけど消えちゃう場合があるので...
karky7 ~ # mkdir /home/cuomo/src karky7 ~ # cp -rf /var/tmp/portage/sys-libs/glibc-2.17/work/glibc-2.17/ /home/cuomo/src/ karky7 ~ # chown -R cuomo:cuomo /home/cuomo/src/
cuomo@karky7 ~/src/glibc-2.17 $ find /home/cuomo/src/glibc-2.17 -type d | xargs -i echo "dir {}" >> ~/.gdbinit
cuomo@karky7 ~/src/glibc-2.17 $ cat ~/.gdbinit | head -n 10
dir /home/cuomo/src/glibc-2.17/posix
dir /home/cuomo/src/glibc-2.17/posix/rxspencer
dir /home/cuomo/src/glibc-2.17/posix/bits
dir /home/cuomo/src/glibc-2.17/posix/sys
dir /home/cuomo/src/glibc-2.17/grp
dir /home/cuomo/src/glibc-2.17/localedata
dir /home/cuomo/src/glibc-2.17/localedata/charmaps
dir /home/cuomo/src/glibc-2.17/localedata/tst-fmon-locales
dir /home/cuomo/src/glibc-2.17/localedata/locales
dir /home/cuomo/src/glibc-2.17/localedata/tests-mbwc
cuomo@localhost ~/src/glibc-2.17 $
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char *p = NULL;
p = (char*)malloc(sizeof(char) * 1024);
if(p) {
strcpy(p, "OK マロックさんが着ました\n");
puts(p);
} else {
puts("無理っす\n");
}
return 0;
}
そしてビルドcuomo@karky7 ~ $ gcc -g malloc_test.c -o malloc_test
Current directory is ~/src/
GNU gdb (Gentoo 7.6.2 p1) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"
and \"show warranty\" for details.
This GDB was configured as \"x86_64-pc-linux-gnu\".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Warning: /home/cuomo/src/glibc-2.17/autom4te.cache: \\343\\201\\235\\343\\201...
Reading symbols from /home/cuomo/src/malloc_test...done.
(gdb) l
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 int main(void)
6 {
7 char *p = NULL;
8
9 p = (char*)malloc(sizeof(char) * 1024);
10 if(p) {
(gdb) b malloc
Breakpoint 1 at 0x400530
(gdb)
で動かすと(gdb) r Starting program: /home/cuomo/src/malloc_test warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 (gdb)そうするとglibcの中のmalloc関数でブレークする、emacsの別フレームにブレークしたソース箇所が表示さる
...
...
alloc_last_block = (void *) alloc_ptr;
alloc_ptr += n;
return alloc_last_block;
}
void * weak_function
malloc (size_t n)
{
B =>return __libc_memalign (sizeof (double), n);
}
/* We use this function occasionally since the real implementation may
be optimized when it can assume the memory it returns already is
set to NUL. */
void * weak_function
...
...
と言う感じでmallocで停止してくれる、これは便利、他のパッケージでも同じ、これならいろんなコードを読めて動かせるgetHomeR :: Handler Html
getHomeR = defaultLayout $ do
let cs = ".kazuto .g" :: Text
tag = "<div>Kazuto g</div>" :: Text
tag2 = [hamlet|<div>Kazuto g|]
setTitle "最近キャバクラに..."
caba <- setCabaName "jito"
$(widgetFile "home")
setCabaName :: MonadWidget m => String -> m String
setCabaName tailstr = return $ "A" ++ tailstr
<p .#{cs}>Here
#{tag}
^{tag2}
#{caba}
<p class=".kazuto .g">Here</p> <div>Kazuto g</div> <div>Kazuto g</div> Ajito
import Yesod.Auth.HashDB (authHashDBWithForm, getAuthIdHashDB, HashDBUser(..))
instance YesodAuth App where
type AuthId App = UserId
-- Where to send a user after successful login
loginDest _ = HomeR
-- Where to send a user after logout
logoutDest _ = HomeR
-- Override the above two destinations when a Referer: header is present
redirectToReferer _ = True
getAuthId creds = getAuthIdHashDB AuthR (Just . UniqueUser) creds
authPlugins _ = [authHashDBWithForm loginForm (Just . UniqueUser)]
...
...
loginForm :: Route App -> Widget loginForm action = $(whamletFile "templates/loginform.hamlet")
<div style="text-align:center">
<h2>日本語でログインフォーム
<form method="post" action="@{action}">
<table border="0" cellpadding="0" cellspacing="0" style="margin-left: auto; margin-right: auto">
<tbody>
<tr>
<td valign="top">ログインID:
<td valign="top">
<input name="username" style="width:250px">
<tr>
<td valign="top">パスワード:
<td valign="top">
<input type="password" name="password" style="width:250px">
<tr>
<td colspan="2" valign="top">
<input type="submit" value="乱入じゃなくてログインする">
instance Yesod App where
-- Controls the base of generated URLs. For more information on modifying,
-- see: https://github.com/yesodweb/yesod/wiki/Overriding-approot
approot = ApprootMaster $ appRoot . appSettings
...
...
...
-- Default to Authorized for now.
-- ここをisLoginedで書き換え
isAuthorized _ _ = isLogined
...
...
-- ログインしていたらAuthorizedを返す
isLogined::HandlerT App IO AuthResult
isLogined = do
mu <- maybeAuthId
return $ case mu of
Nothing -> AuthenticationRequired
Just _ -> Authorized
isAuthorizedの引数を指定すれば対応するURLにAuthorizationがかかるらしい(適当ですいません)、なるほどぉ