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 Alexa = require('ask-sdk-core'); | |
| // 立ち上げ時に呼ばれる | |
| const LaunchRequestHandler = { | |
| canHandle(handlerInput) { | |
| return handlerInput.requestEnvelope.request.type === 'LaunchRequest'; | |
| }, | |
| handle(handlerInput) { | |
| const speechText = 'ようこそ、アレクサスキルキットへ。こんにちは、と言ってみてください。'; |
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
| """ | |
| LINE NotifyをPythonから使う | |
| """ | |
| import requests | |
| import sys | |
| url = "https://notify-api.line.me/api/notify" | |
| message = sys.argv[1] | |
| params = {"message" : message} | |
| token = "tokennnnnnnnnnnnnnnn" |
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
| #include "DHT.h" | |
| #define DHTPIN 2 | |
| #define DHTTYPE DHT11 | |
| DHT dht(DHTPIN, DHTTYPE); | |
| void setup() { | |
| Serial.begin(9600); | |
| Serial.println("DHT11 test!"); | |
| dht.begin(); |
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
| /* | |
| HC-SR04 Ping distance sensor] | |
| VCC to arduino 5v GND to arduino GND | |
| Echo to Arduino pin 9 Trig to Arduino pin 8 | |
| More info at: http://goo.gl/kJ8Gl | |
| */ | |
| #include <Wire.h> | |
| #include <ST7032.h> |
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
| /* | |
| HC-SR04 Ping distance sensor] | |
| VCC to arduino 5v GND to arduino GND | |
| Echo to Arduino pin 9 Trig to Arduino pin 8 | |
| More info at: http://goo.gl/kJ8Gl | |
| */ | |
| #define trigPin 8 | |
| #define echoPin 9 | |
| const int speakerPin = 11; |
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
| /* | |
| ST7032 I2C LCD control sample | |
| Original source : HelloWorld.ino (LiquidCrystal Library) | |
| 2013/05/21 tomozh@gmail.com | |
| */ | |
| /* | |
| LiquidCrystal Library - Hello World | |
| Demonstrates the use a 16x2 LCD display. The LiquidCrystal |
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
| #define BEAT 300 // 音の長さを指定 | |
| #define PINNO 12 // 圧電スピーカを接続したピン番号 | |
| void setup() { | |
| } | |
| void loop() { | |
| tone(PINNO,262,BEAT) ; // ド | |
| delay(BEAT) ; | |
| tone(PINNO,294,BEAT) ; // レ | |
| delay(BEAT) ; |
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 sys | |
| import os | |
| dirpath = os.path.dirname(os.path.abspath(__file__)) | |
| sys.path.append(dirpath) | |
| # Change working directory so relative paths (and template lookup) work again | |
| os.chdir(os.path.dirname(__file__)) | |
| import bottle | |
| # ... build or import your bottle application here ... |
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
| " -------------------------- | |
| " Start Neobundle Settings. | |
| " --------------------------- | |
| " bundleで管理するディレクトリを指定 | |
| set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
| " Required: | |
| call neobundle#begin(expand('~/.vim/bundle/')) | |
| " neobundle自体をneobundleで管理 |
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
| # mod_wsgi config | |
| WSGIDaemonProcess @@@@@ user=www-data group=www-data processes=1 threads=5 | |
| WSGIScriptAlias /@@@@ /var/www/@@@@/adapter.wsgi | |
| <Directory /var/www/@@@@> | |
| WSGIProcessGroup @@@@ | |
| WSGIApplicationGroup %{GLOBAL} | |
| Order deny,allow | |
| Allow from all | |
| </Directory> | |
| ErrorLog ${APACHE_LOG_DIR}/error.log |
NewerOlder