Kotlin 1.4 Online Event, October 12–15, 2020 で発表されたトークについてのメモ
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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 | |
############################################################# | |
# mp4togif.sh | |
# ======================================== | |
# $ ./mp4togif.sh video_to_convert.mp4 | |
# ======================================== | |
# ffmpeg入ってること前提 | |
# $ brew install ffmpeg | |
# (参考) |
About this codelab
- Last updated 6月 18, 2020
- Written by Hoi Lam (revamping author), Yash Katariya (original author)
このベータ版コードラボではTensorFlow Lite Model MakerとAndroid Studio 4.1 Beta 1以降を使った最新のツールを紹介します。また動作を確認するのに物理的なAndroid端末が必要になります。安定版のコードラボを試したい場合はこちらを参照ください。
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 | |
SCALE="720" | |
fullpath=$1 | |
if [ $fullpath ];then | |
echo $fullpath | |
else | |
echo No file provided | |
exit 1 |
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 | |
DIRECTORY="/sdcard/DCIM/Camera/" | |
SCALE="720" | |
fullpath=$(adb shell exec ls ${DIRECTORY}*.mp4|peco) | |
filename=$(basename -- "$fullpath") | |
extension="${filename##*.}" | |
name="${filename%.*}" | |
adb pull $fullpath . |
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 | |
export PATH=$PATH:/usr/local/bin | |
function toggle_light() { | |
host='192.168.xxx.xxx' | |
if [ $1 -eq 0 ];then | |
/usr/local/bin/tplink-smarthome-api setPowerState $host false | |
else | |
/usr/local/bin/tplink-smarthome-api setPowerState $host true | |
fi |
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 | |
while :;do | |
filename=`date +"%Y-%m-%d_%H-%M-%S"` | |
screencapture -Cx screenshot_${filename}.jpg | |
convert screenshot_${filename}.jpg -resize 50% screenshot_${filename}_small.jpg | |
# imagesnap -w 2 face_${filename}.jpg | |
# convert face_${filename}.jpg -resize 25% face_${filename}_small.jpg |
NewerOlder