Skip to content

Instantly share code, notes, and snippets.

View haijima's full-sized avatar

HAIJIMA Kazuki haijima

  • Tokyo, Japan
  • 04:04 (UTC +09:00)
View GitHub Profile
@haijima
haijima / DynamoProxy.vm
Last active January 4, 2017 15:29
APIGateway Mapping Template
#set($items = $input.path('$.Items'))
[#foreach($item in $items){
#foreach($param in $item.keySet())
#foreach($key in $item.get($param).keySet())
#if($key != 'M')
$param : $item.get($param).get($key)
#else
$param : {
#foreach($nestedParam in $item.get($param).get($key).keySet())
#foreach($nestedKey in $item.get($param).get($key).get($nestedParam).keySet())
@haijima
haijima / StackTrace.java
Last active February 3, 2016 10:07
print stack trace
for (StackTraceElement stack : (new Throwable()).getStackTrace()) {
System.out.println(String.format("%s#%s(%d)", stack.getClassName(), stack.getMethodName(), stack.getLineNumber()));
}
@haijima
haijima / sample.html
Last active March 28, 2019 22:41
dropdown checkbox list with bootstrap
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>checklist sample</title>
<!-- style -->
<style>
.dropdown-menu > li.checkbox{
padding: 3px 20px;
}
@haijima
haijima / espresso_static_import.java
Created September 16, 2015 03:01
Espresso static import
import static android.support.test.espresso.Espresso.*;
import static android.support.test.espresso.matcher.ViewMatchers.*;
import static android.support.test.espresso.action.ViewActions.*;
import static android.support.test.espresso.assertion.ViewAssertions.*;
import static org.hamcrest.Matchers.*;