- Option 1: Don't include hidden file
rsync -r --exclude=".*" source/ destination/
| FROM ruby:2.6.1 | |
| RUN curl -sL https://deb.nodesource.com/setup_8.x | bash \ | |
| && apt-get update && apt-get install -y nodejs xvfb libfontconfig wkhtmltopdf && rm -rf /var/lib/apt/lists/* \ | |
| && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
| && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
| && apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/* | |
| # Packages for wkhtmltopdf. These are available in ubuntu but not in debian 9. Base image uses debian 9. | |
| RUN wget -q -O /tmp/libjpeg-turbo8.deb http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.1-0ubuntu2_amd64.deb \ | |
| && dpkg -i /tmp/libjpeg-turbo8.deb \ |
| #!/usr/bin/env bash | |
| # https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce | |
| # https://docs.docker.com/compose/install/ |
| # show indices on this host | |
| curl 'localhost:9200/_cat/indices?v' | |
| # edit elasticsearch configuration file to allow remote indexing | |
| sudo vi /etc/elasticsearch/elasticsearch.yml | |
| ## copy the line below somewhere in the file | |
| >>> | |
| # --- whitelist for remote indexing --- | |
| reindex.remote.whitelist: my-remote-machine.my-domain.com:9200 |
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
| # best practice: linux | |
| nano ~/.pgpass | |
| *:5432:*:username:password | |
| chmod 0600 ~/.pgpass | |
| # best practice: windows | |
| edit %APPDATA%\postgresql\pgpass.conf | |
| *:5432:*:username:password | |
| # linux |
| <?php | |
| /** | |
| * array_merge_recursive_numeric function. Merges N arrays into one array AND sums the values of identical keys. | |
| * WARNING: If keys have values of different types, the latter values replace the previous ones. | |
| * | |
| * Example: | |
| * | |
| * $a = array( "A" => "bob", "sum" => 10, "C" => array("x","y","z" => 50) ); | |
| * $b = array( "A" => "max", "sum" => 12, "C" => array("x","y","z" => 45) ); | |
| * $c = array( "A" => "tom", "sum" => 8, "C" => array("x","y","z" => 50, "w" => 1) ); |
| <?php | |
| // https://gist.github.com/magnetikonline/650e30e485c0f91f2f40 | |
| class DumpHTTPRequestToFile { | |
| public function execute($targetFile) { | |
| $data = sprintf( | |
| "%s %s %s\n\nHTTP headers:\n", | |
| $_SERVER['REQUEST_METHOD'], | |
| $_SERVER['REQUEST_URI'], | |
| $_SERVER['SERVER_PROTOCOL'] |
| $(".month").datepicker("option", { "changeMonth": false, "changeYear": false, "stepMonths": 0}); |