Skip to content

Instantly share code, notes, and snippets.

View mattak's full-sized avatar
👨‍💻
working

Takuma Maruyama mattak

👨‍💻
working
View GitHub Profile
@mattak
mattak / dpidir
Created April 9, 2013 11:59
change directory {xx} -> drawable-{yy}dpi/
#!/bin/sh
#
# change dpi directory
#
# 36 -> ldpi
# 48 -> mdpi
# 72 -> hdpi
# 96 -> xhdpi
#
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.010;
use Text::CSV_XS;
use Log::Minimal;
use Path::Class;
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.010;
use Encode;
use Path::Class;
use Text::CSV_XS;
@mattak
mattak / adiff
Created May 24, 2013 02:10
android project diff
#!/usr/bin/env ruby
#
# android diff checker
#
# usage:
# adiff app1/src/ app2/src/
#
def to_filehash(filelist)
@mattak
mattak / lshift
Created June 1, 2013 17:06
insert number of space before printing the line.
#!/usr/bin/env ruby
if ARGV.size != 1
puts "usage: lshift [num]"
exit 0
end
num = ARGV[0].to_i
STDIN.each do |line|
@mattak
mattak / cdiff
Last active December 18, 2015 01:19
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
require 'optparse'
#
# common diff viewer
#
#
# $ find . -type f | cdiff
#
@mattak
mattak / clip
Created June 6, 2013 02:21
clip temporary message.
#!/usr/bin/env ruby
require 'json'
require 'optparse'
def clipfile
return File.join(Dir.home, ".cliplog")
end
def load
return File.exists?(clipfile) ? File.open(clipfile, "r").read : "{}"
@mattak
mattak / gradroid
Last active December 20, 2015 01:39
gradle android library project startup flavor
#!/bin/sh
#
# gradle android plugin
#
function usage() {
cat <<__USAGE__
usage:
@mattak
mattak / imcon.cpp
Created August 20, 2013 10:55
image concatenate
//
// imcon
// image concatenater
// usage:
// imcon [img]+
//
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
@mattak
mattak / sample.geojson
Last active August 29, 2015 13:56
tokyo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.