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.unuuu.exoplayer | |
import android.net.Uri | |
import android.os.Bundle | |
import android.os.Handler | |
import android.support.v7.app.AppCompatActivity | |
import com.google.android.exoplayer2.DefaultLoadControl | |
import com.google.android.exoplayer2.ExoPlayerFactory | |
import com.google.android.exoplayer2.SimpleExoPlayer | |
import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory |
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
<!doctype html> | |
<html ng-app="todoApp"> | |
<head> | |
<script src="./bower_components/angular/angular.min.js"></script> | |
<script src="todo.js"></script> | |
</head> | |
<body> | |
<div> | |
<h1>Hello</h1> | |
<div ng-controller="TodoListController"> |
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 main | |
import ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"regexp" | |
"strings" | |
) | |
const url = "https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E4%B8%80%E8%A6%A7" |
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/bash | |
curl -F "file=@$BITRISE_IPA_PATH" -F "token=$DEPLOYGATE_API_KEY" -F "message=deploy from bitrise" https://deploygate.com/api/users/$DEPLOYGATE_USER/apps |
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
# Gradle | |
# refs: https://gist.github.com/nolanlawson/8694399 : bash-version | |
function gradle_command() { | |
local gradle_cmd='gradle' | |
if [[ -x ./gradlew ]]; then | |
gradle_cmd='./gradlew' | |
fi | |
if [[ -x ../gradlew ]]; then | |
gradle_cmd='../gradlew' | |
fi |
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
/** | |
* ボタンを押した時に入力が空の時は何もしないで | |
* 入力はあるが20文字より多い時はエラーを表示する | |
*/ | |
mButton.setOnClickListener(v -> | |
Observable.just(mEditText.getText().toString()) | |
.filter(text -> !text.isEmpty()) | |
.filter(text -> { | |
if (20 < text.length()) { | |
throw new IllegalStateException("Invalid your text length."); |
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.unuuu.recordingmovie; | |
import android.media.MediaPlayer; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import com.devbrackets.android.exomedia.EMVideoView; |
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.unuuu.recordingmovie; | |
import android.hardware.Camera; | |
import android.media.MediaRecorder; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import android.view.TextureView; | |
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
# coding: utf-8 | |
require 'pp' | |
require 'json' | |
require 'yaml' | |
require 'google/api_client' | |
require 'google/api_client/client_secrets' | |
require 'google/api_client/auth/file_storage' | |
require 'google/api_client/auth/installed_app' |
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
DownloadManager downLoadManager = (DownloadManager)getActivity().getSystemService(Context.DOWNLOAD_SERVICE); | |
DownloadManager.Request request = new DownloadManager.Request(imageUri); | |
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "image.png"); | |
File pathExternalPublicDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); | |
pathExternalPublicDir.mkdirs(); | |
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); | |
request.allowScanningByMediaScanner(); | |
request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI); | |
downLoadManager.enqueue(request); |