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
# ja.lproj/Localizable.strings を正として、次のチェックを行います | |
# 1. jaのキーと同じキーが他言語にもあるか | |
# 2. jaのコメントと同じコメントが他言語にもあるか | |
# 3. jaのバリューに"%%", "%s", "%1$s", "%@", "%1$@", "%d", "%1$d", "\n" がある時、他言語にも同じ文字列が同じ個数含まれているか | |
# 4. バリューに"%"だけの文字が含まれていないか | |
# 実行例) ruby ./scripts/localization/localizable_strings_checker.rb Project/Languages Localizable.strings | |
# https://github.com/rylev/apfel | |
require 'apfel' |
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 ( | |
"flag" | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"log" | |
"os" |
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 ( | |
"flag" | |
"fmt" | |
mapset "github.com/deckarep/golang-set/v2" | |
"log" | |
"os" | |
"path/filepath" | |
"regexp" |
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 json | |
import urllib.request | |
import urllib.parse | |
import urllib.error | |
def load_all_public_channels(token): | |
"""全チャネルの情報を取得する | |
:param token: (str) SlackのAPI Token | |
:return: (str) レスポンスのjsonオブジェクト |
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 json | |
import urllib.request | |
import urllib.parse | |
import urllib.error | |
API_BASE_URL = 'https://slack.com/api' | |
ALL_MEMBER_CHANNEL_ID = 'xxxxxxxx' # #generalなど、全メンバーが入っている元となるチャネルのID | |
def load_channel_info(channel_id, token): | |
"""指定したチャネルの情報を取得する |
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
const slackApiUrl = 'https://slack.com/api'; | |
const slackToken = 'xoxp-hogehoge'; | |
function execute() { | |
// 現在日時を取得 | |
const currentDate = new Date(); | |
// チャネル一覧を取得 | |
let url = slackApiUrl + '/conversations.list'; | |
url += '?token=' + slackToken; |
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
const webhookUrlForTest = 'https://hooks.slack.com/services/xxxxxxxx' | |
const webhookUrl = 'https://hooks.slack.com/services/xxxxxxxx' | |
function execute() { | |
// 今日の年月日を取得 | |
const date = new Date(); | |
const todayYear = date.getFullYear(); | |
const todayMonth = date.getMonth() + 1; | |
const todayDay = date.getDate(); | |
const dayOfWeek = ["日", "月", "火", "水", "木", "金", "土"][date.getDay()]; |
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
fun skipSmartLock() { | |
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) | |
val noneButton = device.findObject(UiSelector().textMatches("(上記以外)|(NONE OF THE ABOVE)").className("android.widget.Button")) | |
if (noneButton.exists()) { | |
noneButton.click() | |
} | |
} |
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 -xe | |
# Usage: | |
# ./auto_remove_unused_resources.sh {github token} master | |
readonly GITHUB_TOKEN=${1} | |
readonly BASE_BRANCH=${2} | |
readonly ROOT_DIR=$PWD | |
readonly SRC_DIR="app/src" | |
readonly COMPARE_BRANCH="remove_unused_resources" |
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 -*- | |
import commands | |
import glob | |
import os | |
import xml.etree.ElementTree as ElementTree | |
# http://stackoverflow.com/questions/33573807/faithfully-preserve-comments-in-parsed-xml-python-2-7 | |
class CommentedTreeBuilder(ElementTree.TreeBuilder): | |
def __init__(self, *args, **kwargs): |
NewerOlder