#atom-sync-settings.md
This file contains 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
#Slackにアップロードされたファイルを一括削除 | |
token="__YOUR_API_KEY__" | |
timeStamp=1451573999 #2015年12月31日23時59分 | |
fileCount=`curl -s "https://slack.com/api/files.list?token=${token}&ts_to=${timeStamp}&pretty=1&count=${fileCount}" | jq .paging.total` | |
echo $fileCount 件 | |
files=`curl "https://slack.com/api/files.list?token=${token}&ts_to=${timeStamp}&pretty=1&count=${fileCount}"| jq ".files[].id" | sed -e "s/\"//g"` | |
for var in $files | |
do |
This file contains 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 argparse | |
import os.path | |
import subprocess | |
parser = argparse.ArgumentParser( | |
description="This script deitals : http://qiita.com/KoheiKanagu/items/752c64aeeb154970d22e" | |
) | |
parser.add_argument( | |
"--init", |
This file contains 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 nbformat | |
import os | |
import sys | |
file_name = sys.argv[1] | |
def parse(code: list) -> nbformat.v4: | |
nb = nbformat.v4.new_notebook() | |
nb["cells"] = [] |
This file contains 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
extension on num { | |
Duration get second => Duration(seconds: toInt()); | |
Duration get millisecond => Duration(milliseconds: toInt()); | |
} | |
extension on Duration { | |
Future<void> get delay => Future.delayed(this); | |
} |
This file contains 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/sh | |
# `xcrun simctl list` で対象デバイスのUUIDを見つける | |
xcrun simctl openurl D6541EDA-06AC-465D-A178-93CC2093DAB8 https://example.com |
This file contains 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
# 参考: [flutterで本番/ステージング/開発を切り替える \- Qiita](https://qiita.com/ko2ic/items/53f97bb7c28632268b5a#%E7%92%B0%E5%A2%83%E3%81%94%E3%81%A8%E3%81%AE%E8%A8%AD%E5%AE%9A) | |
rm -rf "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" | |
echo "-----${CONFIGURATION}-----" | |
echo "-----${SRCROOT}-----" | |
if [ "${CONFIGURATION}" = "Debug" ] || [ "${CONFIGURATION}" = "Debug-Dev" ] || [ "${CONFIGURATION}" = "Release-Dev" ]; then | |
cp "$SRCROOT/Runner/GoogleService-Info-dev.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist" | |
echo "dev GoogleService-Info copied." |
This file contains 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 -eu | |
# fvm is https://github.com/leoafarias/fvm | |
# https://flutter.dev/docs/get-started/install/macos から最新のものを参照すること | |
FLUTTER_ZIP="flutter_macos_1.22.4-stable.zip" | |
curl -O "https://storage.googleapis.com/flutter_infra/releases/stable/macos/$FLUTTER_ZIP" | |
unzip $FLUTTER_ZIP |
This file contains 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
void main() async { | |
final futures = <Future<String>>[]; | |
final waited = await Future.wait(futures); | |
final actual = waited.singleWhere( | |
(element) => element == 'Hello1', | |
orElse: () => 'unknown', | |
); |
This file contains 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
void main() async { | |
final futures = <Future<String>>[ | |
Future.delayed( | |
Duration(seconds: 1), | |
() => 'Hello1', | |
), | |
Future.delayed( | |
Duration(seconds: 2), | |
() => 'Hello2', | |
), |
OlderNewer