Simplest Switchbot Command
It tested on Raspberry Pi Zero W with Raspbian Stretch.
$ sudo apt-get install python-pip libglib2.0-dev bluez-tools
$ sudo pip install bluepy
const tf = require('@tensorflow/tfjs-node'); | |
const Jimp = require('jimp'); | |
// Directory path for model files (model.json, metadata.json, weights.bin) | |
// NOTE: It can be obtained from [Export Model] -> [Tensorflow.js] -> [Download my model] | |
// on https://teachablemachine.withgoogle.com/train/image | |
const MODEL_DIR_PATH = `${__dirname}`; | |
// Path for image file to predict class | |
const IMAGE_FILE_PATH = `${__dirname}/example.jpg`; |
#!/usr/bin/env perl | |
# Perl - Gmail IMAP Using OAuth 2.0 (XOAUTH2) | |
# I referred to: http://eatenbyagrue.org/tags/oauth/index.html Thank you. | |
use strict; | |
use warnings; | |
use utf8; | |
use Mail::IMAPClient; |
#!/bin/sh | |
echo -e "-- Removing exited containers --\n" | |
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes | |
echo -e "\n\n-- Removing untagged images --\n" | |
docker rmi --force $(docker images | awk '/^<none>/ { print $3 }') | |
echo -e "\n\n-- Removing volume directories --\n" | |
docker volume rm $(docker volume ls --quiet --filter="dangling=true") |
# For Android JellyBean and newer device | |
adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="window_animation_scale"' | |
adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="transition_animation_scale"' | |
adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="animator_duration_scale"' | |
# For Android ICS and older device | |
adb shell "echo \"update system set value=0.0 where name='window_animation_scale';\" | sqlite3 /data/data/com.android.providers.settings/databases/settings.db" | |
adb shell "echo \"update system set value=0.0 where name='transition_animation_scale';\" | sqlite3 /data/data/com.android.providers.settings/databases/settings.db" |
#!/bin/bash | |
set -e | |
echo -e "Image Converter for Slack Emoji\nNOTICE: The image will be overwritten." | |
if [ $# -lt 1 ]; then | |
echo "USAGE:" | |
echo -e " ${0} IMG_FILE [IMG_FILE...]\n" | |
echo "IMG_FILE:" |
machine: | |
java: | |
version: oraclejdk8 | |
environment: | |
# Java options | |
JAVA_OPTS: "-Xms512m -Xmx2048m" | |
# ADB options | |
ADB_INSTALL_TIMEOUT: 5000 | |
dependencies: |
var $ = require('jquery')(require('jsdom-no-contextify').jsdom().parentWindow); | |
// Support for Cross-domain request with using jQuery | |
// See: http://garajeando.blogspot.jp/2012/06/avoiding-xmlhttprequest-problem-using.html | |
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | |
$.support.cors = true; | |
$.ajaxSettings.xhr = function () { | |
return new XMLHttpRequest; | |
} |
Unofficial CLI command for mornin'+ (mornin' plus) smart curtain.
Requirements: Python 3, bluepy 3.2+, pycryptodome 3.6+