Skip to content

Instantly share code, notes, and snippets.

View yoshiki's full-sized avatar

Yoshiki Kurihara yoshiki

View GitHub Profile
@yoshiki
yoshiki / Main.java
Created December 29, 2010 10:12
A Program for fetching app information from android market
import java.io.FileOutputStream;
import com.gc.android.market.api.MarketSession;
import com.gc.android.market.api.MarketSession.Callback;
import com.gc.android.market.api.model.Market.AppsRequest;
import com.gc.android.market.api.model.Market.CommentsRequest;
import com.gc.android.market.api.model.Market.GetImageRequest;
import com.gc.android.market.api.model.Market.GetImageResponse;
import com.gc.android.market.api.model.Market.ResponseContext;
import com.gc.android.market.api.model.Market.GetImageRequest.AppImageUsage;
(defalias 'perl-mode 'cperl-mode)
(autoload 'cperl-mode "cperl-mode" "alternate mode for editing perl script." t)
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\|cgi\\|t\\)$" . cperl-mode))
(add-hook 'cperl-mode-hook
(lambda()
(require 'perl-completion)
(perl-completion-mode t)))
(add-hook 'cperl-mode-hook
(lambda ()
#!perl
my $GIF_DATA = pack "C43", (
0x47, 0x49, 0x46, 0x38, 0x39, 0x61,
0x01, 0x00, 0x01, 0x00, 0x80, 0xff,
0x00, 0xc0, 0xc0, 0xc0, 0x00, 0x00,
0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
0x00, 0x02, 0x02, 0x44, 0x01, 0x00,
@yoshiki
yoshiki / layout.xml
Created January 12, 2011 09:14
画面下にボタンを配置する
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView
android:id="@+id/web_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
# png(Imager-0.79/GD-2.45)
Benchmark: timing 100 iterations of G::B::QRcode, I::QRCode::plot, I::QRCode::plot_qrcode...
G::B::QRcode: 1 wallclock secs ( 0.66 usr + 0.02 sys = 0.68 CPU) @ 147.06/s (n=100)
I::QRCode::plot: 0 wallclock secs ( 0.12 usr + 0.02 sys = 0.14 CPU) @ 714.29/s (n=100)
(warning: too few iterations for a reliable count)
I::QRCode::plot_qrcode: 0 wallclock secs ( 0.11 usr + 0.01 sys = 0.12 CPU) @ 833.33/s (n=100)
(warning: too few iterations for a reliable count)
Rate G::B::QRcode I::QRCode::plot I::QRCode::plot_qrcode
G::B::QRcode 147/s -- -79% -82%
I::QRCode::plot 714/s 386% -- -14%
@yoshiki
yoshiki / Auto-Notify.pm
Created January 18, 2011 08:38
For using notifo on tiarra
#+ Auto::Notify {
# mask: *@*
# keyword: foo,bar,baz
# blocks: notifo
# notifo {
# type: notifo
# api-key: yourapikey
# user: yourusername
# format: #(nick.now): #(text)
# }
@yoshiki
yoshiki / appstore.pl
Created February 8, 2011 15:41
fetch app stats from appstore
#!/usr/bin/perl
#
# Product Type Identifier Category Description
# 1 Free or Paid Apps iPhone and iPod Touch
# 7 Updates iPhone and iPod Touch
# IA1 In Apps In-App Purchase
# IA9 In Apps In-App Subscription
# 1F Free or Paid Apps Universal Apps
# 7F Updates Universal Apps
# 1T Free or Paid Apps iPad App
@yoshiki
yoshiki / pom.xml
Created October 13, 2011 02:27
Maven pom.xml for Android project
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.android</groupId>
<artifactId>my-android-app</artifactId>
<version>0.1</version>
<packaging>apk</packaging>
@yoshiki
yoshiki / pom.xml
Created October 13, 2011 02:29
Maven pom.xml for Android library project
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.android</groupId>
<artifactId>my-android-library</artifactId>
<version>0.1</version>
<packaging>apklib</packaging>
<name>my-android-library</name>
@yoshiki
yoshiki / register.pl
Created December 7, 2011 04:50
Perl scripts for im.kayac.com
#!/usr/bin/env perl
use strict;
use warnings;
use AnyEvent::XMPP::Client;
use AnyEvent;
use Config::Pit;
use Encode;
use constant DEBUG => 0;