Skip to content

Instantly share code, notes, and snippets.

View a1yama's full-sized avatar

あいやま EIichi Yamazaki a1yama

View GitHub Profile
h1 {
padding: 0.4em 0.5em;/*文字の上下 左右の余白*/
color: #494949;/*文字色*/
background: #f4f4f4;/*背景色*/
border-left: solid 5px #7db4e6;/*左線*/
border-bottom: solid 3px #d7d7d7;/*下線*/
}
h2 {
position: relative;
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ESC | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / | -_ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Lower| Raise| Misc | Alt |Space |Enter | Alt | Misc | Raise| Lower| GUI |
* `-----------------------------------------------------------------------------------'
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ESC | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / | -_ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Alt | Misc | Raise| Lower|Space |Enter |Lower | Raise| Misc | Alt | GUI |
* `-----------------------------------------------------------------------------------'
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../config/config.php';
$blogConfigFile = __DIR__ .'/../config/blog_config.php';
$arrBlogConfig = include $blogConfigFile;
$blogConfig = $arrBlogConfig["blogConfig"];
$cli = new Goutte\Client();
String result = null;
RequestBody body = new FormEncodingBuilder()
.addEncoded("key1", "value1")
.addEncoded("key2", "value2")
.addEncoded("key3", "value3")
.build();
// リクエストオブジェクトを作って
Request request = new Request.Builder()
.url(base_url)
import android.os.AsyncTask;
import android.util.Base64;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
context = getApplicationContext();
gcm = GoogleCloudMessaging.getInstance(this);
registerInBackground();
webView = (WebView) findViewById(R.id.webview);
Bundle bundle = intent.getExtras();
String message = bundle.getString("message");
try {
Bundle extras = intent.getExtras();
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
String messageType = gcm.getMessageType(intent);
if (!extras.isEmpty()) {
NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext());
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.content.Context;
import com.google.android.gms.gcm.GoogleCloudMessaging;
import com.google.android.gms.iid.InstanceID;
import android.app.IntentService;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.gcm.GoogleCloudMessaging;
public class GcmIntentService extends IntentService {
private final String PUSH_MSG_KEY = "message";