Skip to content

Instantly share code, notes, and snippets.

View canujohann's full-sized avatar

johann CANU canujohann

  • Axa Life Insurance
  • Tokyo
View GitHub Profile
@canujohann
canujohann / help.java
Last active August 29, 2015 14:04
android-db-helper
package com.example.alartest.DB;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/**
* SQLiteOpenHelper helper
* @author canu
@canujohann
canujohann / create-new-user-new-table.sql
Created August 25, 2014 01:52
Create new user / DB in sql
```
CREATE DATABASE invoice;
CREATE USER 'invoice'@'localhost' IDENTIFIED BY 'invoice';
GRANT ALL PRIVILEGES ON invoice . * TO 'invoice'@'localhost';
FLUSH PRIVILEGES;
```
@canujohann
canujohann / plugin-unity.md
Last active August 29, 2015 14:06
Plugin unity

Assets/Plugins/Androidプラグイン下に[Appmart_Plugin.cs]:

using UnityEngine;
using System.Collections;

public class Appmart_Plugin : MonoBehaviour {
	
	static AndroidJavaObject m_appmart;
	static GameObject m_instance ;
@canujohann
canujohann / new-relic.md
Last active August 29, 2015 14:07
new relic
sudo su - 
rpm -Uvh http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm
yum install newrelic-sysmond
nrsysmond-config --set license_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/etc/init.d/newrelic-sysmond start
@canujohann
canujohann / add-border.java
Created October 3, 2014 06:27
add-border-to-bitmap
Paint mShadow = new Paint();
// radius=10, y-offset=2, color=black
mShadow.setShadowLayer(10.0f, 0.0f, 2.0f, 0xFF000000);
// in onDraw(Canvas)
canvas.drawBitmap(bitmap, 0.0f, 0.0f, mShadow);
@canujohann
canujohann / seo.md
Last active November 11, 2015 04:35
SEO sheet
@canujohann
canujohann / AnimationImageView.java
Created October 27, 2014 03:17
Android : animate an ImageView with multiple bitmaps
package com.example.views;
import java.util.ArrayList;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
@canujohann
canujohann / load-languages-files-angular.js
Last active August 29, 2015 14:10
load-languages-files-angular.js
var module = angular.module("myapp", []).config(["$locationProvider", function($locationProvider) {
$locationProvider.html5Mode(true);
}]);
module.controller("mycontroller", function($scope, $http,$location) {
// Authorized languages
var languages = ['en','ja','fr'];
var default_lang = 'ja';
// Copyright 2012 Pierre-Yves Ricau
//
// 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
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@canujohann
canujohann / study.md
Last active August 29, 2015 14:10
2014-12-03 勉強会

Groovy

Groovy logo

Groovyとは

Java仮想マシン(JVM) 向けの ダイナミック言語 です。

Groovyを使うメリット