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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>large list scrolling test</title> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
| <style> | |
| #nodes label:hover{ |
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
| #icon-list svg { | |
| animation-name: pulse; | |
| animation-duration: 1.6s; | |
| animation-timing-function: linear; | |
| animation-direction: alternate; | |
| animation-iteration-count: infinite; | |
| } | |
| #icon-list svg:nth-child(1){ | |
| animation-delay: -.6s; |
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
| wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | |
| sudo apt-key add mosquitto-repo.gpg.key |
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
| // ---------------------------------------------------------------- | |
| // DEBUG FUNCTIONS | |
| /** | |
| * output to developer console if in debug mode | |
| */ | |
| function debug(args) { | |
| try { | |
| log(args.callee.name, 'info') | |
| } catch (e) { | |
| log(args, 'info') |
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
| # create palette | |
| ffmpeg -y -ss 30 -t 3 -i swipe-navigation.ogg -vf fps=10,scale=320:-1:flags=lanczos,palettegen pallete.png | |
| # convert ogg video to gif using created palette | |
| ffmpeg -i swipe-navigation.ogg -i palette.png -lavfi "fps=15,scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse" -y swipe-navigation.gif |
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
| /** | |
| * if a function already exists you can overwrite it but still keeping the original functionality | |
| * | |
| * this example adds a console message before and after the original function "functionToOverwrite" | |
| */ | |
| functionToOverwrite = (function() { | |
| var cached_function = functionToOverwrite; | |
| return function() { |
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
| git log --pretty=format:"%ad:%an:%d:%B" --date=short --reverse --branches --since=2.months.ago --author=Emrys |
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
| docker run -it --link emoncmsdocker_db_1:mysql --net emoncmsdocker_default --rm mysql sh -c 'exec mysql -hdb -uemoncms -pYOUR_SECURE_PASSWORD emoncms' |
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 | |
| namespace mqttPub; | |
| define('EMONCMS_EXEC', 1); | |
| /* | |
| All Emoncms code is released under the GNU Affero General Public License. | |
| See COPYRIGHT.txt and LICENSE.txt. | |
| --------------------------------------------------------------------- | |
| Emoncms - open source energy visualisation |
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 | |
| /* | |
| creates mosquitto client and connects before the infinite blocking loop loopForever() | |
| is used to keep the connection until finished | |
| it finishes when the disconnect() is called once the publish() is sent | |
| I have been able to loop this in a bash script 50 times without error: | |
| ` | |
| $ for i in {1..50}; do php mqtt-pub-test.php ; done |