Skip to content

Instantly share code, notes, and snippets.

@iratqq
iratqq / gist:20362
Created October 28, 2008 12:36
ao_sndio.c
/*
*
* ao_sndio.c
*
* Original Copyright (C) Aaron Holtzman - May 1999
* Modifications Copyright (C) IWATA Ray - Oct 2008
*
* This file is part of libao, a cross-platform library. See
* README for a history of this source code.
*
@iratqq
iratqq / gist:20644
Created October 29, 2008 06:55
spamchampuru.scm
;; Copyright (c) Iwata <iwata@quasiquote.org>
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
;; "Software"), to deal in the Software without restriction, including
;; without limitation the rights to use, copy, modify, merge, publish,
;; distribute, sublicense, and/or sell copies of the Software, and to
;; permit persons to whom the Software is furnished to do so, subject to
;; the following conditions:
;;
(* ocamlfind ocamlc -linkpkg -package "json-static json-wheel netclient" -o wassr_get wassr_get.ml *)
open Json_type
open Http_client.Convenience
type json wassr_json =
<
favorites: string array;
?user_login_id: string;
?areacode: string = "";
@iratqq
iratqq / gist:21607
Created November 2, 2008 01:00
wassr_get.ml
(* ocamlfind ocamlc -linkpkg -package netclient -w -s xml-light.cma -o wassr_get wassr_get.ml *)
open Xml;;
open Http_client.Convenience;;
let get_and_print url =
let s = http_get url in
let x = Xml.parse_string s in
print_string (Xml.to_string_fmt x);
flush stdout
@iratqq
iratqq / 長門ビューワ.el
Created November 11, 2008 02:11
長門ビューワ.el
;; 長門ビューワ
(defun show-nagato ()
"show 長門"
(interactive)
(and (y-or-n-p "(nagato)")
(switch-to-buffer "*長門*")
(insert-image
(create-image "ngatao.jpg"))
(read-from-minibuffer "hit enter key: ")
(kill-buffer "*長門*")))
@iratqq
iratqq / 痛いニュース.css
Created November 14, 2008 17:19
痛いブラウザ用
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://blog.livedoor.jp/dqnplus/") {
span.aa {
font-family: IPAMonaPGothic !important;
line-height: 1.1 !important;
font-size: 10pt !important;
}
.fullbody, #articlebody, datetop, #articletop, #blogcontainer {
/* background: #ddffdd !important; */
;; Copyright (c) Iwata <iwata@quasiquote.org>
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
;; "Software"), to deal in the Software without restriction, including
;; without limitation the rights to use, copy, modify, merge, publish,
;; distribute, sublicense, and/or sell copies of the Software, and to
;; permit persons to whom the Software is furnished to do so, subject to
;; the following conditions:
;;
@iratqq
iratqq / me.sh
Created November 24, 2008 20:23
#! /bin/sh
# my name is 'me.sh'
./me.sh &
./me.sh &
--- gettext-runtime/intl/dcigettext.c.orig Mon Oct 22 03:41:41 2007
+++ gettext-runtime/intl/dcigettext.c Mon Dec 1 01:07:40 2008
@@ -1276,15 +1276,16 @@
char *outptr = (char *) outbuf;
size_t outleft;
- if (freemem_size < sizeof (size_t))
+ if (freemem_size < sizeof (size_t) + 1)
goto resize_freemem;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iconv.h>
int
iconv_convert(char **outstr, char *instr, const char *tocode, const char *fromcode)
{
iconv_t cd;
size_t ins;