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
# 現在の行を Vim で編集し、結果をプロンプトに戻す(自動実行しない) | |
__edit_line_in_vim() { | |
local tmp | |
tmp=$(mktemp /tmp/cmd.XXXXXX) | |
printf '%s\n' "$READLINE_LINE" > "$tmp" | |
"${VISUAL:-${EDITOR:-vi}}" "$tmp" < /dev/tty > /dev/tty 2>&1 | |
READLINE_LINE="$(cat "$tmp")" | |
READLINE_POINT=${#READLINE_LINE} | |
rm -f "$tmp" | |
} |
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
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.drawable.AdaptiveIconDrawable; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.util.TypedValue; | |
import androidx.core.content.ContextCompat; |
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
static final String CHANNEL_ID = "orders"; | |
static final String GROUP_KEY = "group_orders"; | |
void postGroupedNotifications(Context ctx) { | |
NotificationManager nm = ctx.getSystemService(NotificationManager.class); | |
if (Build.VERSION.SDK_INT >= 26) { | |
NotificationChannel ch = new NotificationChannel( | |
CHANNEL_ID, "Orders", NotificationManager.IMPORTANCE_DEFAULT); | |
nm.createNotificationChannel(ch); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<!-- 画面中央の垂直ガイドライン(比率は必要に応じて調整) --> | |
<androidx.constraintlayout.widget.Guideline |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:padding="16dp"> | |
<!-- 1つ目:CheckBox --> | |
<CheckBox |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/keypad_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:padding="16dp"> | |
<!-- 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
まだ調査していない | |
・リリース手順書 確認 | |
* 調査済 | |
・Fuel phpページングでボタンデザインを有効表示できるか? | |
pagination.phpでデフォルトしか読み込めないようなのでcontrollerで指定したら出来た | |
https://github.com/rainbow23/fuelphp/blob/1.8/master/fuel/app/classes/controller/welcome.php#L49-L83 | |
資料sample |
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
<?php | |
$sample = array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); | |
$begin = 0; | |
$end = 5; | |
/* | |
* 0 | |
* 1 | |
* 2 | |
* 3 | |
* 4 |
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
#!/usr/bin/env bash | |
# vim: set filetype=ruby: | |
# b - browse Chrome bookmarks with fzf | |
[ $(uname) = Darwin ] || exit 1 | |
which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1 | |
/usr/bin/ruby -x "$0" | | |
fzf --ansi --multi --no-hscroll --tiebreak=begin | | |
awk 'BEGIN { FS = "\t" } { print $2 }' | |
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
<?php | |
ignore_user_abort(true); | |
function syscall ($cmd, $cwd) { | |
$descriptorspec = array( | |
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to | |
2 => array('pipe', 'w') // stderr | |
); | |
$resource = proc_open($cmd, $descriptorspec, $pipes, $cwd); | |
if (is_resource($resource)) { |
NewerOlder