Demo app to go along with blog post about creating custom TopoJSON data here
http://datamaps.markmarkoh.com/using-custom-map-data-w-datamaps/
| $('body').html('').css({'text-align' : 'center'}) | |
| GALLERY_DATA.images.forEach( | |
| function(i) { | |
| $('body').append('<img style="margin-bottom: 40px; text-align" src="' + i.urls.full + '">') | |
| } | |
| ) |
| sudo vim /etc/rc.local | |
| su ermolaev -c "export PATH="/home/ermolaev/miniconda3/bin:$PATH" && jupyter notebook --no-browser --notebook-dir=/home/ermolaev/jupyter &" | |
| sudo reboot | |
| sudo systemctl status rc-local.service |
| # jpeg - > jpg | |
| find -name '*.jpeg' -exec rename 's/\.jpeg/\.jpg/' '{}' \; | |
| # удаляем | |
| find public/files/comments/ -type f -name '*.bmp' -delete | |
| th2umb -> thumb | |
| find -type f -name '*thumb*' -delete | |
| find -name '*th2umb*' -exec rename 's/th2umb/thumb/' '{}' \; |
| config.vm.network :forwarded_port, guest: 5432, host: 15432 | |
| http://stackoverflow.com/questions/14139017/cannot-connect-to-postgres-running-on-vm-from-host-machine-using-md5-method | |
| sudo -u postgres pg_dump gz > gz.dump | |
| sudo -u postgres psql -h localhost -p 15432 -U postgres gz < gz.dump |
| http://www.joeconway.com/presentations/plr-PGConfNYC2014.pdf | |
| sudo apt-get install postgresql-9.4-plr | |
| --------------------------------------------------- | |
| CREATE EXTENSION plr; | |
| CREATE OR REPLACE FUNCTION r_lib_paths () | |
| RETURNS text AS ' | |
| .libPaths() |
| # сделать бэкап | |
| pg_dump -U postgres -h localhost -Fc gp > gp.dump | |
| # pg_restore -U postgres -h localhost -j $(nproc) -Fc -d gp gp.dump # на экстренный случай | |
| sudo apt-get install postgresql-9.6 postgresql-contrib-9.6 postgresql-server-dev-9.6 | |
| # sudo apt-get install postgresql-9.6-postgis-2.3 или aptitude install | |
| # sudo apt-get install postgresql-plr-9.6 | |
| # postgresql-server-dev-9.6 нужен для компилирования postgis | |
| sudo cp /etc/postgresql/9.5/main/pg_hba.conf /etc/postgresql/9.6/main/pg_hba.conf |
| CREATE TEMP TABLE test_data ON COMMIT DROP AS (SELECT | |
| warehouses.product_id::TEXT, | |
| user_id AS transaction_id | |
| FROM | |
| "line_items" | |
| INNER JOIN "users" ON "users"."id" = "line_items"."user_id" | |
| INNER JOIN "warehouses" ON "warehouses"."id" = "line_items"."warehouse_id" | |
| INNER JOIN "products" ON "products"."id" = "warehouses"."product_id" | |
| AND (products.deleted_at IS NULL) | |
| WHERE |
http://datamaps.markmarkoh.com/using-custom-map-data-w-datamaps/