Noted

Setup rclone hệ điều hành Linux

Cài đặt rclone cd /root/ wget https://downloads.rclone.org/rclone-current-linux-amd64.zip unzip rclone-current-linux-amd64.zip \cp rclone-v*-linux-amd64/rclone /usr/sbin/ rm -rf rclone-* Sử dụng rclone Kết nối google drive với rclone rclone config No remotes found – make a new one, nhập n -> Enter để tạo kết nối mới. Ở dòng name bạn nhập remote để đặt tên cho kết nối, …

Setup rclone hệ điều hành Linux Read More »

Cài đặt Elasticsearch trên Centos

Điều kiện tiên quyết để sử dụng Elasticsearch Để chạy được  Elasticsearch thì hệ thống của bạn cần có Java 8 trở lên Để kiểm tra trên server đã có Java chưa, bạn cần dùng lệnh java -version openjdk version “11.0.7” 2020-04-14 LTS OpenJDK Runtime Environment 18.9 (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.7+10-LTS, …

Cài đặt Elasticsearch trên Centos Read More »

502 Bad Gateway – Nginx

Update PHP, Nginx, DB Mở tập tin nano /etc/nginx/nginx.conf – Thêm đoạn cấu hình sau vào trong block http { } http { … fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; include /etc/nginx/conf.d/*.conf; } Nếu muốn tìm hiểu chuyên sâu hơn về các cấu hình trên, các bạn có về vào …

502 Bad Gateway – Nginx Read More »

Image: internet

How to respond to clicks on a checkbox in an AngularJS ng-repeat (table)?

Source: http://stackoverflow.com/questions/11872832/how-to-respond-to-clicks-on-a-checkbox-in-an-angularjs-directive <table class=”table”> <thead> <tr> <th> <input type=”checkbox” ng-click=”selectAll($event)” ng-checked=”isSelectedAll()”> </th> <th>Title</th> </tr> </thead> <tbody> <tr ng-repeat=”e in entities” ng-class=”getSelectedClass(e)”> <td> <input type=”checkbox” name=”selected” ng-checked=”isSelected(e.id)” ng-click=”updateSelection($event, e.id)”> </td> <td>{{e.title}}</td> </tr> </tbody> </table> In controller var updateSelected = function(action, id) { if (action === ‘add’ && $scope.selected.indexOf(id) === -1) { $scope.selected.push(id); } if (action === …

How to respond to clicks on a checkbox in an AngularJS ng-repeat (table)? Read More »

ASP.NET C# MVC5

Removing X-Powered-By ASP.Net

Do not show response header Server Microsoft-IIS/7.5 X-AspNetMvc-Version 3.0 X-AspNet-Version 4.0.303319 X-Powered-By ASP.NET Removing X-AspNet-Version Web.config <system.web> <httpRuntime enableVersionHeader=”false”/> Removing X-AspNetMvc-Version Global.asax.cs protected void Application_Start() { MvcHandler.DisableMvcResponseHeader = true; } Removing or changing Server In Global.asax.cs add this: protected void Application_PreSendRequestHeaders() { //Response.Headers.Remove(“Server”); //Remove header Response.Headers.Set(“Server”,”ServerName”); //Change Server header Response.Headers.Remove(“X-AspNet-Version”); //alternative to above solution Response.Headers.Remove(“X-AspNetMvc-Version”); …

Removing X-Powered-By ASP.Net Read More »