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
| // Slightly modified Adalight protocol implementation that uses FastLED | |
| // library (http://fastled.io) for driving WS2811/WS2812 led stripe | |
| // Was tested only with Prismatik software from Lightpack project | |
| #include "FastLED.h" | |
| #define NUM_LEDS 114 // Max LED count | |
| #define LED_PIN 6 // arduino output pin | |
| #define GROUND_PIN 10 | |
| #define BRIGHTNESS 255 // maximum brightness |
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
| /* | |
| ffmpeg -i "$file" -f s32be -acodec pcm_s32be -ar 44100 -af "volume=0.5" tcp://espip:5522 | |
| */ | |
| #include "i2s.h" | |
| #include <ESP8266WiFi.h> | |
| const char* ssid = "***********"; | |
| const char* password = "**********"; | |
| WiFiServer pcmServer(5522); | |
| static WiFiClient pcmClient; |
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
| <?php | |
| /*** | |
| * Pull HTML source for given URL and format for output | |
| * 2011 haliphax https://github.com/haliphax | |
| **/ | |
| ?> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Format page as plain text</title> |
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
| <canvas id="canvas" width="800" height="256" ></canvas> | |
| <p id="controls"> | |
| <input type="button" id="start_button" value="Start"> | |
| | |
| <input type="button" id="stop_button" value="Stop"> | |
| </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
| <canvas id="canvas" width="512" height="256" ></canvas> | |
| <p id="controls"> | |
| <input type="button" id="start_button" value="Start"> | |
| | |
| <input type="button" id="stop_button" value="Stop"> | |
| </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
| <canvas id="canvas" width="512" height="256" ></canvas> | |
| <p id="controls"> | |
| <input type="button" id="start_button" value="Start"> | |
| | |
| <input type="button" id="stop_button" value="Stop"> | |
| </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
| // convert 0..255 R,G,B values to binary string | |
| RGBToBin = function(r,g,b){ | |
| var bin = r << 16 | g << 8 | b; | |
| return (function(h){ | |
| return new Array(25-h.length).join("0")+h | |
| })(bin.toString(2)) | |
| } | |
| // convert 0..255 R,G,B values to a hexidecimal color string | |
| RGBToHex = function(r,g,b){ |
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
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
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
| long HexRGB = ((long)leds[i].r << 16) | ((long)leds[i].g << 8 ) | (long)leds[i].b; // get value and convert. | |
| Serial.println("Hex: 0x" + String(HexRGB, HEX)); |
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://sayakb.github.io/sticky-notes/pages/install/ | |
| # https://github.com/sayakb/sticky-notes | |
| mkdir /var/www/paste && cd /var/www/paste.domain.tld && git clone https://github.com/sayakb/sticky-notes.git . | |
| chown -Rv www-data:www-data /var/www/paste | |
| cp stickynotes_nginx.conf /etc/nginx/sites-enabled/paste.domain.tld | |
| ln -s /etc/nginx/sites-available/paste.domain.tld /etc/nginx/sites-enabled/. | |
| /etc/init.d/nginx reload | |
| cd /var/www/paste.domain.tld/app/config | |
| mv database.sample.php database.php |