Shows 4 views of WebCam:
- Original frames from WebCam
- With Face detection
- With Canny filter
- With ThreashHold filter
| #!/bin/sh | |
| echo -e "`date +'%Y-%m-%d %T.%N%z'` Starting Nginx..." | |
| CONFIG_SRC=/custom/config/site.conf | |
| CONFIG_DEST=/etc/nginx/conf.d/site.conf | |
| CONFIG_LOGS=/custom/logs | |
| # Replacing needed environment variables in config (envsubst will break $uri) | |
| # Store final config in logs, for easier debugging |
Visuals for prezentation: Being lazy in practice
| #!/bin/sh | |
| while true; do | |
| import -window root `date +%s-%N`.jpg | |
| sleep 1 | |
| done; |
Copy server-client.html into your server. E.g. it is http://aurelijus.banelis.lt/server-client.html
Run php -S localhost:12345 localhost-server.php
You should see 3 in http://localhost:12345/?a=1&b=2
You should see 1+2 = 3 when opened server-client.html on your own server.
| <?php | |
| require 'context.php'; | |
| $odd = array_flip(array_filter(array_flip($pairs), | |
| function($key) { return $key % 2 == 0; } | |
| )); | |
| $even = array_diff($pairs, $odd); | |
| $sumOdd = array_reduce($odd, Summation::$fSum); | |
| $sumEven = array_reduce($even, ['Summation', 'rSum']); |
| <?php | |
| $a = [1,2]; | |
| function f($b) { | |
| xdebug_debug_zval('b'); | |
| return [$b[1], $b[0]]; | |
| } | |
| xdebug_debug_zval('a'); | |
| $c = f($a); | |
| xdebug_debug_zval('c'); |
| #!/bin/sh | |
| # About: | |
| # Execute command when file is changed. | |
| # | |
| # Usage: | |
| # ./iocron.sh filt/to/watch "echo 'command'" | |
| # | |
| # Dependencies | |
| # sudo apt-get install inotify-tools |
| #!/bin/sh | |
| # Adds new virtual host to Apache and hosts file. | |
| if [ "$#" -ne 2 ] | |
| then | |
| echo "Usage: addVHost.sh directory domain" | |
| echo "Example: www/myProject myproject.local" | |
| exit 1 | |
| fi |