Skip to content

Instantly share code, notes, and snippets.

View mrtry's full-sized avatar
🥳

Shinnosuke Yamamoto mrtry

🥳
View GitHub Profile
@mrtry
mrtry / slide.md
Created January 19, 2022 09:25
リリース時までに知っておきたい署名まわりの話
marp paginate
true
true
<style> img[alt~="center"] { display: block;
@mrtry
mrtry / check-xcode-version.sh
Created May 21, 2021 08:53
.xcode-versionと一致してるかをチェックするスクリプト
# Project rootに移動
cd $(git rev-parse --show-toplevel)
if [ "$(cat .xcode-version)" != "$(xcodebuild -version | awk 'NR==1{print $2}')" ]; then
echo 'Invalid Xcode version'
echo ".xcode-version: $(cat .xcode-version)"
echo "xcodebuild version: $(xcodebuild -version | awk 'NR==1{print $2}')"
exit 1
fi
@mrtry
mrtry / Gemfile
Last active May 23, 2021 10:49
Bump version for react-native
# android/ ios/ に配置
source "https://rubygems.org"
fastlaneVersion = File.join(File.dirname(__FILE__), '../fastlane-version')
eval_gemfile(fastlaneVersion) if File.exist?(fastlaneVersion)
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
@mrtry
mrtry / post-checkout
Created May 19, 2021 12:11
run `npm install` when update package.json
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
prevHEAD=$1
nextHEAD=$2
prevPackageHash=$(git log --format="%C(auto)%h%Creset" -n 1 $prevHEAD -- package.json | cat)
nextPackageHash=$(git log --format="%C(auto)%h%Creset" -n 1 $nextHEAD -- package.json | cat)
if [ "$prevPackageHash" != "$nextPackageHash" ]; then
@mrtry
mrtry / merge-release-branch-to-master-and-create-tag.yml
Created May 18, 2021 02:42
Merge release branch to master & create tag
name: 'Merge `release/x.x.x` to master & create x.x.x tag'
on:
pull_request:
types:
- opened
jobs:
create-tag:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref, 'release/')
steps:
@mrtry
mrtry / getProcessInfo.java
Created July 7, 2017 11:43
Check app process priority.
private static Map<Integer, String> importance = new HashMap<Integer, String>();
private static Map<Integer, String> reason = new HashMap<Integer, String>();
static {
importance.put(ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND, "IMPORTANCE_FOREGROUND");
importance.put(ActivityManager.RunningAppProcessInfo.IMPORTANCE_PERCEPTIBLE, "IMPORTANCE_PERCEPTIBLE");
importance.put(ActivityManager.RunningAppProcessInfo.IMPORTANCE_VISIBLE, "IMPORTANCE_VISIBLE");
importance.put(ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE, "IMPORTANCE_SERVICE");
importance.put(ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE, "IMPORTANCE_FOREGROUND_SERVICE");
importance.put(ActivityManager.RunningAppProcessInfo.IMPORTANCE_BACKGROUND, "IMPORTANCE_BACKGROUND");