Skip to content

Instantly share code, notes, and snippets.

@cattaka
cattaka / adb-screenshot.sh
Last active December 6, 2017 00:51 — forked from hkurokawa/adb-screenshot.sh
A shell script to take a screen shot of the android device, resize it and copy to clipboard
#! /bin/bash
## This script is for taking a screen shot of an Android device.
## If possible, it tries to resize the image file and then copy to the clipboard.
##
## The script passes unrecognized arguments to adb command, which means you can specify "-e" or "-d"
## to select which device to take a screenshot of.
if [ -z $(which adb) ]; then
echo "Error. adb must be installed and in PATH." 1>&2
public class LearnGenerics {
static abstract class AbsRecursive<A extends AbsRecursive<A, T>, T> {
RecursiveListener<A, ? super T> mListener;
T mItem;
public <XA extends AbsRecursive<XA, ? super T>>
void setListener(RecursiveListener<? super XA, ? super T> listener) {
// FIXME: I could not fix this.
@SuppressWarnings("unchecked")
RecursiveListener<A, ? super T> l = (RecursiveListener<A, ? super T>) listener;
public class LearnGenericsAssignment {
static class Func<T> {
T item;
public T getItem() {
return item;
}
public void setItem(T item) {
this.item = item;
public class CanNotCompileThisGenerics {
static class AbsScrambleAdapter<A extends AbsScrambleAdapter<A, T>, T> {
}
static class IViewHolderFactory<A extends AbsScrambleAdapter<A, ?>> {
}
static class ScrambleAdapter<T> extends AbsScrambleAdapter<ScrambleAdapter<T>, T> {
}
docker run -v `pwd`/article:/article vvakame/review /bin/bash -c "cd article && rm -r TechBook-pdf TechBook.pdf ; review-pdfmaker config.yml"
package com.wantedly.android.profile.utils;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
/**
* Created by cattaka on 2016/08/03.
*/
public class ClassOrderComparator implements Comparator<Object> {
def dump_values(obj)
results = ""
obj.keys.each do |key|
results += key.to_s + "\t" + obj[key].to_s + "\n"
end
results
end
def dump_tsv(rows)
keys = rows.map do |row|
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
# Change BusID if necessary. Tips: (lspci | grep 3D) (Change 01:00.0 to 1:0:0)
import rx.functions.Action1;
import rx.schedulers.Schedulers;
import rx.subjects.PublishSubject;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* Created by cattaka on 16/09/24.
import net.vvakame.util.jsonpullparser.JsonFormatException;
import net.vvakame.util.jsonpullparser.JsonPullParser;
import net.vvakame.util.jsonpullparser.util.JsonUtil;
import net.vvakame.util.jsonpullparser.util.OnJsonObjectAddListener;
import net.vvakame.util.jsonpullparser.util.TokenConverter;
import java.io.IOException;
import java.io.Writer;
import io.realm.RealmList;