docker network create -o "com.docker.network.bridge.enable_ip_masquerade"="false" lan-restricted
Blocks
Local LAN
Internet
Does not block
Host running docker daemon (example access to 10.0.1.10:22)
After succesfully setup Spring-Boot application all the configuration is handled in an application.properties file. You will find the file at src/main/resources/.
Normally there is a need to have a database behind the application. For development its good to have a setup of dev and a prod environme...
To track so called "virtual pageviews", use the ga('send') method right after your asynchronous request:
Syntax: ga('send', 'pageview', 'path to your virtual page');
Example (Simple Link):
<a href="http://example.com/my.pdf"
onClick="ga('send', 'pageview', '/virtu...
Example of how ReplaceAll only applies a rule at most once, while ReplaceRepeated will do so in a loop but always restart application from the first rule.
x + a /. {
a_ + z :> (Print[0]; DoneA),
a_ + x :> (Print[1]; y + z),
a_ + y :> (Print[2]; DoneB)}
(* Prints "1"...
In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73.
So, be sure if you have Java in your system. If not, then follow the procedure:
# Install wget with yum
yum -y install w...
The best way to install and configure a Symfony2 project is described in the official documentation as follows:
Mac OS X / Linux
$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
Windows
c:\> php -r "file_put_contents('sym...
How to implement Firebase Real-Time database in Android applications.
Setup/Installation:
First, install the Firebase SDK (guide)
Register your project using the Firebase console
After successfuly completing the two steps above, add the following dependency in your application level ...
[Function <name>] (glob) {
$.src(glob)
.pipe([plugin 1])
.pipe([plugin 2])
.
.
.
.pipe([plugin n])
.pipe( $.dest(<destination-name>)
}
Note
pipe is a method that streams all the files matching the glob input , to our plugins( minifyhtml in this case) .
It is simple ...
So, Before writing out optimiser functions , we need to install a couple of caching plugins.
bash $ npm install --save-dev gulp-cached
bash $ npm install --save-dev gulp-remember
You might wonder why two caches eh!. gulp-cached , passes only modified or new content down the pipeline to other ...
The anatomy of a task definition is like so:
$.task(<taskname> , [dependencies] , <body>);
dependencies , is an array of tasks that HAVE to finish before the current task you are defining , runs. More like forcing a synchronous execution instead of the default Asynchronous functionalit...
NOTE
This page illustrates use of gulp plugins like browser-sync ,
gulp-watch and run-sequence , and continues discussing
gulp-workflow-automation from where we left off at
Gulpjs-workflow-automation-1 of 2. In case you landed here , consider
going through that post first.
Default Task
...
This example scans for available access points and ad hoc networks. btnScan activates a scan initiated by the WifiManager.startScan() method. After the scan, WifiManager calls the SCAN_RESULTS_AVAILABLE_ACTION intent and the WifiScanReceiver class processes the scan result. The results are displaye...
The returned value is intended to be suitable for use in a URL, not as a human-readable title. Use sanitize_text_field instead.
$new_url = sanitize_title($title);
$incfile = sanitize_file_name($_REQUEST["file"]);
include($incfile . ".php");
Without sanitizing the file name an attacker could simple pass http://attacker_site/malicous_page as input and execute whatever code in your server.
$user = sanitize_user("attacker username<script>console.log(document.cookie)</script>");
$user value after sanitize is "attacker username"
First off you create the form
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
}
Action Method
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Test(FormViewModel formData)
{
// ...
}
Script
<script src="https://code.jquery.com/jquery-1.12.4.min.js"&g...