まずpythonのpipをインストール
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 <stdio.h> | |
| void goal() | |
| { | |
| puts("goal!"); | |
| } | |
| int main(int argc, char *argv[]) | |
| { | |
| void (*f)(); |
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
| // | |
| // jpeg_camera_test_for_esp8266.ino | |
| // | |
| #include <Adafruit_VC0706.h> // https://github.com/adafruit/Adafruit-VC0706-Serial-Camera-Library/ | |
| #include <SoftwareSerial.h> // https://github.com/plerup/espsoftwareserial | |
| SoftwareSerial serial = SoftwareSerial(4, 5); | |
| Adafruit_VC0706 camera = Adafruit_VC0706(&serial); | |
| void setup() { |
注意
- El CapitanからSIP(System Intregrity Protection)が有効なので/System以下のファイルは直接触ることができない
- https://forums.developer.apple.com/thread/4731?q=SIP
追加でポート10022番でsshdをlistenさせる設定。
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
| // | |
| // mqtt_pub_hdc1000_s9648_100.ino - mqtt publish sample for Arduino Yun | |
| // | |
| #include <YunClient.h> | |
| #include <PubSubClient.h> | |
| #include <Wire.h> | |
| char *server = "mqtt.example.com"; | |
| int port = 1883; | |
| char *username = "username"; |
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
| #!/usr/bin/ruby | |
| require 'mail' | |
| def send | |
| #sendという名前の関数が定義されていると、mail.deliverの実行に失敗する... | |
| end | |
| mail = Mail.new do | |
| from "yoggy0@gmail.com" | |
| to "yoggy0+test@gmail.com" |
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
| #!/usr/bin/ruby | |
| str = "" | |
| ARGF.read.each_line do |l| | |
| str << l.chomp | |
| end | |
| puts str |
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
| #!/usr/bin/ruby | |
| Dir.glob("*.mp4") do |f| | |
| next if /-org/ =~ f | |
| vcopy_file = f; | |
| org_file = f + ".-org.mp4" | |
| File.rename(f, org_file); | |
| cmd = "ffmpeg -i #{org_file} -vcodec copy -map 0:0 #{vcopy_file}" | |
| puts "exec : #{cmd}" |