Skip to content

Instantly share code, notes, and snippets.

Package = $(shell perl -le '$$_=join("",<>);/package=\"([^\"]+)\"/ and print $$1;' AndroidManifest.xml)
Runner = android.test.InstrumentationTestRunner
Target = ../AITC2App
test:
adb shell am instrument -w $(Package)/$(Runner)
update:
android update test-project -m $(Target) -p `pwd`
#!/bin/sh
# Copyright (c), Naruse Motoki ([email protected])
# Licensed under The MIT License
dryrun=`git push -n 2>&1`
echo "$dryrun"
fromto=`echo $dryrun | sed -e "s/.* \([0-9a-z]\+\.\.[0-9a-z]\+\) .*/\1/g"`
if expr "$fromto" : "^[0-9a-z]\+\.\.[0-9a-z]\+$" >/dev/null; then
echo "`git log --date=short --pretty=format:"%h %ad %an %s" $fromto`"
fi
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark;
my $a;
my $b;
my $c;
var url = 'http://gdd-2011-quiz-japan.appspot.com/webgame/problem';
$.get(url, {}, function(data) {
var comment;
if (data.match(/(\[[^\]]+\])/)) {
comment = RegExp.$1;
}
var list = eval(comment);
var pos = {};
for (var i = 0; i < list.length; i += 1) {
var key = list[i];
diff --git a/public/stylesheets/sass/main.sass b/public/stylesheets/sass/main.sass
index 1bc4d8a..56f14e0 100644
--- a/public/stylesheets/sass/main.sass
+++ b/public/stylesheets/sass/main.sass
@@ -1,6 +1,6 @@
// variable
-!link-color = #e2041b
-!link-visited-color = #e597b2
+$link-color: #e2041b
+$link-visited-color: #e597b2
#!/usr/bin/env zsh
# -*- coding: utf-8-unix; -*-
# vim: et fenc=utf-8 ff=unix
# 256色確認
function pcolor() {
for ((f = 0; f < 255; f++)); do
printf "\e[38;5;%dm %3d*■\e[m" $f $f
if [[ $f%8 -eq 7 ]] then
#!/bin/sh
android_sdk_root=$ANDROID_SDK_ROOT
if [ x$android_sdk_root = x"" ]; then
echo '$ANDROID_SDK_ROOT is not set'
exit
fi
android_src=$1
if [ x$android_src = x"" ]; then
@clairvy
clairvy / zsh.zsh
Created September 22, 2010 13:08 — forked from hchbaw/zsh.zsh
#!zsh
# __git_branch_switches
# _git-submodule
# _git-filter-branch
(( $+functions[_git-now] )) ||
_git-now () {
local curcontext=$curcontext state line
declare -A opt_args
#!/usr/bin/env perl
# -*- mode: perl; code: utf-8; -*-
use 5.008;
use strict;
use warnings;
package main;
use Encode ();
use File::Basename ();
EMACS = emacs
OUTPUT = out
TARGET = qsort.el
default : test
test :
$(EMACS) -q --no-site-file --batch -L . -L $$HOME/.emacs.d/auto-install -l el-expectations -f batch-expectations $(OUTPUT) $(TARGET); echo $?; cat $(OUTPUT); $(RM) $(OUTPUT)