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
| #!/bin/bash | |
| # This script subscribes to a MQTT topic using mosquitto_sub. | |
| # On each message received, you can execute whatever you want. | |
| while true # Keep an infinite loop to reconnect when connection lost/broker unavailable | |
| do | |
| mosquitto_sub -h "127.0.0.1" -t "test" | while read -r payload | |
| do | |
| # Here is the callback to execute whenever you receive a message: |
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
| // library from http://z3t0.github.io/Arduino-IRremote/ | |
| // IR receiver는 볼록한 곳을 전면으로 하여 왼쪽부터 D11, GND, 5V 연결 | |
| // 각종 IR 리모콘의 값을 확인 할 수 있다. | |
| #include <IRremote.h> | |
| #include <IRremoteInt.h> | |
| int RECV_PIN = 11; | |
| IRrecv irrecv(RECV_PIN); | |
| decode_results results; |
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/env node | |
| // http://files.supergenpass.com/js/sgp2_0.js | |
| function b64_md5(p) { | |
| p=utf8_en(p); | |
| return binl2b64(core_md5(str2binl(p),p.length*8)); | |
| } | |
| function hex_md5(p) { | |
| p=utf8_en(p); |
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 <NewPing.h> | |
| #include <TM1637Display.h> | |
| const int CLK = 2; //Set the CLK pin connection to the display | |
| const int DIO = 3; //Set the DIO pin connection to the display | |
| #define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on the ultrasonic sensor. | |
| #define ECHO_PIN 11 // Arduino pin tied to echo pin on the ultrasonic sensor. | |
| #define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. |
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 "RCSwitch.h" | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <Servo.h> | |
| RCSwitch mySwitch = RCSwitch(); | |
| Servo myservo; | |
| int pos = 0; | |
| void setup() { |
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
| /* | |
| 1. open https://photos.google.com/assistant | |
| 2. open console | |
| 3. paste codes below | |
| */ | |
| var elements = document.querySelectorAll('.GuNJec div[role=button]');for(var i=0;i<elements.length;i++){elements[i].click();} |
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
| // http://wiki.linuxaudio.org/wiki/raspberrypi 에 따르면 | |
| Force USB1.1 mode | |
| The RPi has a USB2.0 controller that apparently can cause issues with USB1.1 audio interfaces. The solution is to force the controller to use USB1.1 mode. You can do this by adding the following kernel parameter to your /boot/cmdline.txt file on your RPi: | |
| dwc_otg.speed=1 | |
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
| <!-- | |
| Request중 theme 변수가 있는 경우 theme을 설정한다(cookie). | |
| 예를 들어, /index?theme=default 호출시 | |
| resources/theme/theme-default.properties 파일을 찾는다. | |
| theme-default.properties파일에는 아래와 같은 내용이 있다. | |
| css=/resources/lib/bootstrap/css/bootstrap.min.css | |
| view단에서 | |
| <link rel="stylesheet" href="<spring:theme code='css'/>" type="text/css"/> (JSP) |
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
| // http://www.classicpianosolos.com/sheetmusic/bach/bach-bwv-784-invention-no.-13-719 | |
| #define Dir 3 | |
| #define Step 6 | |
| int DD = HIGH; | |
| int current = 0; | |
| int c1 = 7000; | |
| int d1 = 6500; |
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
| # /etc/network/interfaces | |
| auto lo | |
| iface lo inet loopback | |
| iface eth0 inet dhcp | |
| allow-hotplug wlan0 | |
| auto wlan0 | |
| iface wlan0 inet dhcp |
NewerOlder