Tutorial by Examples: dire

The standard structure for a project built by SBT is: projectName/ build.sbt project/ <SBT sub-build information> src/ main/ scala/ <Scala source files> java/ <Java source files> resources/ ...
For the current shell, this takes you to the previous directory that you were in, no matter where it was. cd - Doing it multiple times effectively "toggles" you being in the current directory or the previous one.
The default directory is the home directory ($HOME, typically /home/username), so cd without any directory takes you there cd Or you could be more explicit: cd $HOME A shortcut for the home directory is ~, so that could be used as well. cd ~
To change to an absolutely specified directory, use the entire name, starting with a backslash \, thus: cd /home/username/project/abc If you want to change to a directory near your current on, you can specify a relative location. For example, if you are already in /home/username/project, you can...
If the target pattern doesn't contain slashes, make will remove the directory part from the target it's trying to build before matching. The directory will then be put in front of the stem. When the stem is used to build the target name and prerequisites, the directory part is stripped from it, the ...
Nginx configuration to detect request from mobile user-agent and redirect them to mobile site. location / { #mobile site handling as per user agent set $mobile_rewrite do_not_perform; // variable to store action. default set to not perform redirection to mobile site. if ($htt...
@at-root directive can be used to localize variables. $color: blue; @at-root { $color: red; .a { color: $color; } .b { color: $color; } } .c { color: $color; } is compiled to: .a { color: red; } .b { color: red; } .c { color: blue; }
// Set up Express var express = require('express'); var app = express(); // Serve static assets from both 'public' and 'files' directory app.use(express.static('public'); app.use(express.static('files'); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Serve files from the absolute path of the directory app.use(express.static(__dirname + '/public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); /* Serve from the absolute path of the directory that you want to serve with a */ virtual path prefix app.use('/static', express.static(__dirname + '/public')); // Start Express server app.listen(3030);
The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. The 301 redirect is consider...
Sometimes it may be required to find out which directory consuming how much disk space especially when you are used df -h and realized your available disk space is low. du: du command summarizes disk usage of the set of FILEs, recursively for directories. It's often uses with -sh option: -s, --s...
Mixins can be passed a block of SASS compliant code, which then becomes available within the mixin as the @content directive. @mixin small-screen { @media screen and (min-width: 800px;) { @content; } } @include small-screen { .container { width: 600px; } } And this wou...
Format: [command] [> | >>] [filename] > saves the output of [command] into [filename]. >> appends the output of [command] into [filename]. Examples: echo Hello World > myfile.txt saves "Hello World" into myfile.txt echo your name is %name% >> myfi...
Format and Usage: echo %cd% %cd% is a system variable that contains the current directory path
Format: cd "<path>" Example: cd "C:\Program Files (x86)\Microsoft Office" cd is an abbreviation for chdir and the two commands behave in the exact same way. For the sake of consistency, cd will be used throughout this topic. To navigate to the directory one leve...
cd by itself will not allow a user to move between drives. To move to a different drive, the /d option must be specified. e.g. Moving from C:\Users\jdoe\Desktop to D:\Office Work cd /d "D:\Office Work"
Usage to list all folders and files in the current directory: dir A target directory can also be specified: dir C:\TargetPath When specifying a path with spaces, it must be surrounded by quotes: dir "C:\Path With Spaces"
If you enable prettyUrl in your yii2-app, your redirect_uri will be: http://<base_url>/web/site/auth And disable pretty url: http://<base_url>/web/index.php?r=site%2Fauth Example:
Go to Providers > ApplicationOAuthProvider.cs and edit the ValidateClientRedirectUri function. This was a big gotcha to me, as if you don't do this there'll be a fantastically unhelpful error message. By default, this code will make any callbacks to your site invalid unless they're to the site's ...

Page 10 of 13