Skip to content

Instantly share code, notes, and snippets.

@t-kashima
t-kashima / gist:2b68e0bc9c5d9d8a58b4
Created September 22, 2015 06:24
MeteorのTシャツをもらおうの会
# 哲学
画面をひたすらだらだら見たい
# アイデア
- 魚が泳いでいるアクアリウムの映像を流す
- アニメの予告を流す
- 女の子が泳いでる映像を流す
- 映画の予告を流す
@t-kashima
t-kashima / Readme.md
Last active September 8, 2015 04:52
サイバードクリエイティブカーニバルの案
@t-kashima
t-kashima / AndroidManifest.xml
Last active August 29, 2015 14:26
Get my location in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unuuu.location" >
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
@t-kashima
t-kashima / sketch_150729b.pde
Last active September 20, 2015 16:21
Sound Visualizer
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
private Minim mMinim;
private AudioPlayer mPlayer;
private static final int BASE_RADIUS = 256;
@t-kashima
t-kashima / MainActivityTest.java
Last active August 29, 2015 14:26
Espressoを使ったテスト
package com.unuuu.myapp;
import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.Espresso;
import android.support.test.espresso.assertion.ViewAssertions;
import android.support.test.espresso.matcher.ViewMatchers;
import android.support.test.runner.AndroidJUnit4;
import android.test.ActivityInstrumentationTestCase2;
import org.junit.After;
@t-kashima
t-kashima / MainActivityTest.java
Last active August 29, 2015 14:26
JUnit4を使ったテスト
package com.unuuu.myapp;
import android.support.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.hamcrest.MatcherAssert.assertThat;
@t-kashima
t-kashima / MainAcitivity.java
Last active August 29, 2015 14:25
Firebase for Java
private Firebase mMembers;
private ImageView mImageView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
this.mImageView = (ImageView)rootView.findViewById(R.id.fragment_main_frame_002);
@t-kashima
t-kashima / MainActivity.java
Last active August 29, 2015 14:25
Firebase for Java
Firebase.setAndroidContext(this);
Firebase rootRef = new Firebase("https://firebase-app.firebaseio.com");
Map<String, String> member = new HashMap<String, String>();
member.put("name", "Google");
Firebase data = rootRef.push();
data.setValue(member);
rootRef.child(data.getKey()).child("name").addValueEventListener(new ValueEventListener() {
@Override
@t-kashima
t-kashima / mechanize.rb
Last active August 29, 2015 14:25
MechanizeでGoogle検索するあれ
# coding: utf-8
require 'mechanize'
agent = Mechanize.new
page = agent.get('http://google.co.jp')
page = page.form_with(:name => 'f') do |form|
form.q = 'UNUUU Foundation'
end.submit
# UNUUU Foundationのリンクを取得する
@t-kashima
t-kashima / MainActivity.java
Last active August 29, 2015 14:23
Icon font
TextView textView = (TextView)findViewById(
R.id.activity_main_frame_001);
Typeface typeFace = Typeface.createFromAsset(getAssets(),
"fontawesome-webfont.ttf");
textView.setTypeface(typeFace);