This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PROJECT=sample | |
DATABASE=sample | |
case $1 in | |
"start") | |
docker rm -f ${PROJECT} | |
docker build -t ${PROJECT} . | |
docker rmi $(docker images | awk '/^<none>/ { print $3 }') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git remote add origin [email protected]:username/repo.git | |
git fetch | |
git branch master origin/master | |
git reset --mixed FETCH_HEAD | |
git branch -vv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 参考 | |
# * https://developers.google.com/google-apps/calendar/quickstart/ruby | |
# * https://github.com/google/google-api-ruby-client/blob/master/samples/cli/lib/samples/analytics.rb | |
# * https://gist.github.com/rakuishi/5010ee819260cdd32a15 | |
# $ gem install google-api-client | |
require 'googleauth' | |
require 'googleauth/stores/file_token_store' | |
require 'google/apis/analytics_v3' | |
require 'fileutils' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$result = $this->service->data_ga->get( | |
'ga:' . $viewId, | |
@date('Y-m-d', strtotime('-3 day')), // 開始日 | |
@date('Y-m-d', strtotime('-2 day')), // 終了日 | |
'ga:screenviews', | |
array( | |
'dimensions' => 'ga:screenName,ga:dimension1', | |
'sort' => '-ga:screenviews', | |
'max-results' => '10', // 件数 | |
'filters' => 'ga:dimension1=@user', // `user` を含むカスタムディメンション 1 の値を検索 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font-family: 'Migu 1M', Hiragino Sans, 'ヒラギノ角ゴシック', Hiragino Kaku Gothic ProN, 'ヒラギノ角ゴ ProN W3', Meiryo, sans-serif; | |
line-height: 1.25; | |
} | |
h1, h2, h3, h4, h5 { | |
margin-top: 32px; | |
} | |
p { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends Activity { | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
getMenuInflater().inflate(R.menu.menu_main, menu); | |
return super.onCreateOptionsMenu(menu); | |
} | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Julian Shen | |
* | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rakuishi.share; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.support.v7.app.ActionBarActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S---+---+ | |
| | | | |
| x | | |
| | | | |
+---+---+ | |
| | | | |
| | | | |
| | | | |
+---+---G |