Skip to content

Instantly share code, notes, and snippets.


Takeshi Yako takeshiyako2

View GitHub Profile
takeshiyako2 / Power Control TP-Link HS105 by tplink-smarthome-api on
Last active Feb 5, 2021
Power Control TP-Link HS105 by tplink-smarthome-api on macOS
View Power Control TP-Link HS105 by tplink-smarthome-api on
takeshiyako2 / Raspberry Pi 4 Model B - USB power ON-OFF -
Last active Jul 11, 2021
Raspberry Pi 4 - USB power ON/OFF by uhubctl
View Raspberry Pi 4 Model B - USB power ON-OFF -


I want to USB power ON/OFF on Raspberry Pi 4.
Raspberry Pi 4でUSBパワーをON/OFFしたい。

Raspberry PiのUSBポートに直接LEDライトを接続してオンオフを試しました。
ここでは、 というユーティリティを使います。 も、だいたい同じことができるようですが、こちらの uhubctl の方が扱いやすそうだったので、こちらを選びました。


takeshiyako2 / Info.plist
Last active Feb 7, 2017
iOS Objective-C against kCFStreamErrorDomainSSL error
View Info.plist
takeshiyako2 / default.conf
Created Sep 12, 2016
nginx ngx_http_geoip_module with AWS ELB
View default.conf
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
if ($allowed_country = yes) {
set $exclusions 1;
takeshiyako2 / renew_ip_address_test.xml
Created Aug 25, 2016
Change Route53 IP address by
View renew_ip_address_test.xml
<?xml version="1.0" encoding="UTF-8"?>
<ChangeResourceRecordSetsRequest xmlns="">
takeshiyako2 / td-agent.conf
Created Jul 27, 2016
fluent-plugin-google-cloud-storage-out config sample
View td-agent.conf
# tail
type tail
format /^(?<date>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}) (?<status>\S+) \[(?<role>\S+)\] (?<info>.*)$/
path /tmp/application.log
pos_file /var/log/td-agent/myapp.application.pos
tag td.myapp.application
<match td.myapp.application>
takeshiyako2 / default.conf
Last active Aug 3, 2017
WordPress + Varnish (Varnish port 80 -> nginx port 8080 -> php-fpm)
View default.conf
# /etc/nginx/conf.d/default.conf
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/wordpress;
index index.php;
location ~ \.php$ {
fastcgi_index index.php;
takeshiyako2 / eccube.conf
Created Jan 14, 2016
EC-CUBE3 nginx config
View eccube.conf
server {
listen 80;
root /var/www/eccube/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
error_page 500 502 503 504 /50x.html;
takeshiyako2 / 017_historia.conf
Last active Jan 20, 2016
nginx ssl settings sample for A++
View 017_historia.conf
server {
listen 443;
root /var/www/historia;
index index.php;
charset utf-8;
gzip on;
gzip_types text/css text/javascript application/json;
ssl on;
takeshiyako2 / AndroidManifest.xml
Created Dec 18, 2015
Android AdMob Interstitial
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
<!-- Include required permissions for Google Mobile Ads to run. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />