Skip to content

Instantly share code, notes, and snippets.

@udonchan
udonchan / ES提出.txt
Created April 16, 2010 05:25
人事にES送るテンプレ
○○株式会社 人事担当様:
莫迦田大学利口学研究科の鈴木うどんです。
先日の説明会に参加させていただきありがとうございました。
参加させていただいたことにより、貴社へ入社したいという思いが高まり、
このたび選考に応募させていただきたく存じます。
つきましては、エントリーシートを添付させていただきしたので
よろしくお願い致します。
@udonchan
udonchan / tumblphoto.php
Created April 15, 2010 13:18
ura86 日記の背景用.udonchan のtumblr 先頭1000件の画像からランダムで表示
<?php
$ci = curl_init('http://udonchan.tumblr.com/api/read/json?num=1&type=photo&start='. mt_rand(0,1000));
curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
$value = json_decode(str_replace(";","",str_replace("var tumblr_api_read = ","",curl_exec($ci))), true);
header("Location: " . $value["posts"][0]["photo-url-400"]);
@udonchan
udonchan / .mozconfig
Created April 13, 2010 05:36
firefox ビルド用 .mozconfig
CPU=`sysctl -a hw 2>&1 | grep 'hw.availcpu' | sed 's|hw.availcpu = *||'`
let J=$CPU*4
CFLAGS="-O3 -finline-limit=8000 -fstack-protector -param=ssp-buffer-size=4 -mieee-fp -funroll-loops -fpeel-loops -march=core2 -fno-trapping-math -fno-tree-pre -ftree-vectorize -ftracer -fsee"
CXXFLAGS="${CFLAGS}"
# As used here, arguments in $MOZ_BUILD_PROJECTS are suitable as arguments
# to gcc's -arch parameter.
mk_add_options MOZ_BUILD_PROJECTS="x86_64 i386"
@udonchan
udonchan / notify_junk_mail.sh
Created April 12, 2010 06:02
Spamasassin が.Junk に分類したメールを norify するスクリプト
#!/bin/sh
export LANG=ja_JP.UTF-8
USERLIST='/etc/.notify_users'
DOMAIN="udonchan.org"
SUBJECT="[${DOMAIN}]SpamMail Notify From MailServer"
for user in `grep -v "^#" $USERLIST`;
do
CNT=0
@udonchan
udonchan / gist:341746
Created March 23, 2010 22:11
UIColor を HTML っぽい感じにするマクロ
#define COLOR_HEX(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 \
green:((c>>8)&0xFF)/255.0 \
blue:(c&0xFF)/255.0 \
alpha:1.0]
#import <UIKit/UIKit.h>
@interface UIMonthAndDayPickerView : UIPickerView<UIPickerViewDelegate, UIPickerViewDataSource> {
int month;
int day;
}
@property (nonatomic,readonly) int month;
@property (nonatomic,readonly) int day;
@end
@udonchan
udonchan / UIMonthAndDayPickerView.m
Created March 17, 2010 04:38
月と日だけを選択するピッカ.iPhone用.
#define _COMPONENT_MONTH_LABEL 0
#define _COMPONENT_DAY_LABEL 1
@implementation UIMonthAndDayPickerView
@synthesize month, day;
- (id)initWithFrame:(CGRect)aRect {
if ([super initWithFrame:aRect] != nil) {
self.delegate = self;
self.dataSource = self;
self.showsSelectionIndicator = YES;
@udonchan
udonchan / Qreki.m
Created March 17, 2010 03:49
旧暦を知る
@implementation Qreki
+(NSString *)month2Qmonth:(int)month {
switch (month) {
case 1:
return @"睦月";
case 2:
return @"如月";
case 3:
return @"弥生";
case 4: