Skip to content

Instantly share code, notes, and snippets.

View a1yama's full-sized avatar

あいやま EIichi Yamazaki a1yama

View GitHub Profile
hello = ->
console.log("Hello World!")
hello()
package jp.hoge.webview;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.WakefulBroadcastReceiver;
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
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";
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;
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());
@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);
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;
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)
<?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();