Skip to content

Instantly share code, notes, and snippets.

@zaki50
zaki50 / FloatingActionButton.java
Last active August 29, 2015 14:03
Material Design の FloatingActionButton のためのクラスを作ってみた
/*
* Copyright (C) 2014 uPhyca Inc.
*
* 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
@cynipe
cynipe / git-flow-with-maven-release-plugin.rst
Created March 22, 2012 07:49
git-flow + maven-release-plugin用の手順

git-flow + maven-release-plugin用の手順

前提

プロジェクトのルートPOMに以下の設定が書かれている必要がある。

SCM情報の設定

@YusukeKokubo
YusukeKokubo / Hello.gwt.xml
Created April 27, 2012 05:25
Hello GwtQuery
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="hello">
<inherits name="com.google.gwt.user.User" />
<inherits name='com.google.gwt.query.Query' />
<source path="client" />
<entry-point class="as.client.Hello"></entry-point>
</module>
@mhawksey
mhawksey / gist:2720726
Created May 17, 2012 18:20
Google Apps Script fetch feed item link
function fetchUrlfromRSS(url) {
var cache = CacheService.getPublicCache(); // using Cache service to prevent too many urlfetch
var cached = cache.get(url);
if (cached != null) { // if value in cache return it
return cached;
}
// otherwise build urlfetch
var options = {"method" : "get"};
try {
var response = UrlFetchApp.fetch(url , options);
@vvakame
vvakame / BitmapType.java
Created June 14, 2012 23:27
ORMLiteでBitmapなフィールドを良い感じに処理してくれるPersisterClass
package net.vvakame.android.entity;
import java.io.ByteArrayOutputStream;
import java.sql.SQLException;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Bitmap.CompressFormat;
import com.j256.ormlite.field.FieldType;
(function(global) {
var Hoge, Fuga, SampleView;
Hoge = (function() {
function Hoge() {
}
Hoge.prototype.init = function(str) {
str = str || "hoge";
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta charset="utf-8"> </head>
<body>
<div> <button id="show-docs-picker">Select Documents in Google Docs</button> </div>
<div> <ul id="picked"></ul> </div>
<script src="https://www.google.com/jsapi"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
(function () {
@akbertram
akbertram / d3.caja.js
Created November 26, 2012 01:29
Caja-safe d3.js
d3 = {
version: "2.10.3"
};
(function() {
function d3_class(ctor, properties) {
try {
for (var key in properties) {
Object.defineProperty(ctor.prototype, key, {
value: properties[key],
@vvakame
vvakame / ChannelController.java
Last active December 11, 2015 10:09
GAE/J のChannel APIを試した時のサンプル。 一意のIDからTokenを生成して利用する。送信する時は一意のIDに対して送信を行うのでTokenなどを知っている必要はない。 まとめると、User KindのKeyのIDなりNameなりに対して適当にメッセージを送りつけてやれば相手が受信可能であれば受け取る。といった感じみたい。たぶん。
import java.io.PrintWriter;
import java.io.Writer;
import java.util.List;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;
import org.slim3.repackaged.org.json.JSONObject;
import org.slim3.util.StringUtil;
@vvakame
vvakame / to-java7.diff
Created February 20, 2013 03:43
Slim3プロジェクトをJava7で開発できるようにした。@zaki50 さんありがとう。 仕事のプロジェクトなので、全体貼るのがめんどくさいのでdiffだけぺとんちょ。
Date: Wed, 20 Feb 2013 12:40:23 +0900
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
appengine/pom.xml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/appengine/pom.xml b/appengine/pom.xml