Skip to content

Instantly share code, notes, and snippets.

View ksoichiro's full-sized avatar
🏠

Soichiro Kashima ksoichiro

🏠
View GitHub Profile
@ksoichiro
ksoichiro / FillGapBaseActivity.java
Created January 5, 2015 11:58
Hide filled space when scrolling down on FillGap example
/*
* Copyright 2014 Soichiro Kashima
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2014 Soichiro Kashima
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ksoichiro
ksoichiro / test.sh
Last active August 29, 2015 14:05
keystoreパスワードの復元テスト
#!/bin/bash
# keystoreパスワードの復元テスト
#
# 下記の
# Download now on gdrive, because gcode has deactivated downloads :(
# というリンクから AndroidKeystoreBrute_v1.05.jar をダウンロードし
# カレントディレクトリに置いて実行してください。
#
# android-keystore-password-recover
@ksoichiro
ksoichiro / README.md
Last active August 29, 2015 14:00
Docker cheetsheet

Remove unnamed images:

docker rmi $(docker images | grep "<none>" | awk '{ print $3 }')

Remove stopped containers:

docker rm $(docker ps -a -q)
@ksoichiro
ksoichiro / .zshrc
Created May 2, 2014 13:55
Part of .zshrc to init folder sharing for boot2docker
export DOCKER_HOST=tcp://localhost:4243
boot2docker status
if [ $? -ne 0 ]; then
boot2docker up
boot2docker ssh "sudo modprobe vboxsf && mkdir -p $HOME && sudo mount -t vboxsf home $HOME"
else
echo "boot2docker is already running. Execute this manuallly:"
echo 'boot2docker ssh "sudo modprobe vboxsf && mkdir -p $HOME && sudo mount -t vboxsf home $HOME"'
fi
@ksoichiro
ksoichiro / provision.sh
Last active August 29, 2015 14:00
Vagrant provisioning script for using Docker
#!/usr/bin/env bash
apt-get update
apt-get install -y git build-essential libssl-dev
apt-get install -y curl
curl -sSL https://get.rvm.io | bash -s stable
source /usr/local/rvm/scripts/rvm
rvm requirements
rvm install 2.0.0-p353
@ksoichiro
ksoichiro / CodingStd.css
Created September 9, 2013 11:47
CSS for Markdown. Roboto, ヒラギノ角ゴ使用。章立ての連番あり。
body {
font-family: Roboto-Light, HiraKakuPro-W3, Helvetica, arial, sans-serif;
font-size: 12px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 10px; }
body > *:first-child {
@ksoichiro
ksoichiro / LinkUtils.java
Created August 19, 2012 11:22
Android: Clickable URL and clickable TextView
package com.blogspot.ksoichiro.linktest;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
@ksoichiro
ksoichiro / child.html
Created May 27, 2012 15:34
How to pass selected IDs to a child window and read page for each IDs
<html>
<head>
<script type="text/javascript">
window.onload = function() {
var ids = [];
if (!window.opener) {
setMsg('You cannot open this page directly.');
return;
}
// Get parent's value from child.
@ksoichiro
ksoichiro / android-suppressions.xml
Created January 29, 2012 04:31
CheckStyle suppression settings for Android
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- Turn off all checks for some libraries. -->
<suppress checks="." files="com[\\/]google[\\/]..*.java" />
<!-- Turn off header checks for some libraries. -->
<suppress checks="Header" files=".*[\\/]android[\\/]fastroid[\\/].*\.java"/>