Skip to content

Instantly share code, notes, and snippets.

View monzou's full-sized avatar

Takuro Monji monzou

  • Tokyo
View GitHub Profile
@monzou
monzou / review_things.scpt
Created March 3, 2011 04:03
Things Script (schdule review tasks)
script TermFactory
on create(numericValue, unit)
script Term
property _numericValue : numericValue
property _unit : unit
to displayName()
(my _numericValue as text) & my _unit
end displayName
package scripts;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
package scripts;
import org.apache.poi.hssf.usermodel.HSSFCellStyle
import org.apache.poi.hssf.usermodel.HSSFFont
import org.apache.poi.hssf.usermodel.HSSFRichTextString
import org.apache.poi.hssf.usermodel.HSSFWorkbook
import org.apache.poi.ss.usermodel.CellStyle
import org.apache.poi.ss.usermodel.IndexedColors
/**
// ==UserScript==
// @name Redmine Assign Support
// @namespace wiv.cc
// @include <TODO>
// @author monzou
// ==/UserScript==
(function () {
function setup() {
require "delegate"
class Support
def initialize(prefix)
@prefix = prefix
@lines = []
end
def write(s)
@monzou
monzou / gist:972232
Created May 14, 2011 13:55
cat w/ system call
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
static void do_cat(const int fd, const char *path);
static void die(const char *s);
@monzou
monzou / gist:972298
Created May 14, 2011 14:59
cat w/ stdio
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[])
{
int i;
for (i = 1; i < argc; i++) {
FILE *f = fopen(argv[i], "r");
int c;
#include <stdio.h>
#include <stdlib.h>
#define _GNU_SOURCE
#include <getopt.h>
static void do_head(FILE *f, long nlines);
#define DEFAULT_N_LINES 10
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <regex.h>
#define _GNU_SOURCE
#include <getopt.h>
static void do_grep(regex_t *pattern, FILE *src, int invert);
@monzou
monzou / english.md
Created May 22, 2011 14:00
english

WORDS

  • for the time being : 当分の間・さしあたり
  • nearby : 近くの(形容詞)- ex. We will meet at a nearby café.

GRAMMAR

  • My interests are subject to change.(変更される可能性があります)
  • Am I right in thinking you will only consider xxx ?(〜 と考えて差し支えないでしょうか?)