antlib.xml

<project name="testAntFile" default="build" basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
...
</target>
</project>

Problem

[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

Solution

copy `ant-contrib-1.0b3.jar` to /usr/share/ant/lib

Advertisements

[ git ] git archive

If you want to extract the contents of a Git repository, perhaps to make it available for a source download somewhere, then you can of course zip (or tar) up the contents of the repository with a command line tool.

$ git archive whateverTag | tar -x -C "/path/to/folder"

ref : http://alblue.bandlem.com/2011/09/git-tip-of-week-git-archive.html

NPM : package manager

way 1 : install jasmine package

npm install jasmine-node

The folder node_modules/jasmine will be created

way 2 : install jasmine package in global scope

sudo npm install -g jasmine-node

NOTE : For macOS the installation path will be like /usr/local/bin/jasmine-node -> /usr/local/lib/node_modules/bower/bin/jasmine-node

way 3 : install all dependencies using package.json ( recommended*** )

package.json

{
&nbsp; &nbsp; &nbsp;"name": "whatever",
&nbsp; &nbsp; &nbsp;"version": "0.0.1",
&nbsp; &nbsp; &nbsp;"description": "whatever",
&nbsp; &nbsp; &nbsp;"main": "index.js",
&nbsp; &nbsp; &nbsp;"scripts": {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"test": "jasmine"
&nbsp; &nbsp; &nbsp;},
&nbsp; &nbsp; &nbsp;"author": "dsin",
&nbsp; &nbsp; &nbsp;"license": "ISC",
&nbsp; &nbsp; &nbsp;"dependencies": {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"jasmine": "^2.5.2"
&nbsp; &nbsp; &nbsp;}
}
Then

npm install

Possible error

No license field

Solution

{
"name": "whatever",

"license": "UNLICENSED"
}

ref : https://github.com/npm/npm/issues/8918#issuecomment-148550718

way 4 : install and add dependency to package.json

npm install jasmine-node --save

or

npm install --save jasmine-node

npm package Example

bower

karma-cli

Update package to specific version

npm update -g minimatch@3.0.2

to solve the following problem

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

ref : http://stackoverflow.com/questions/38046392/npm-warn-deprecated-minimatch2-0-10-please-update-to-minimatch-3-0-2-or-higher

 

[ squid ] cache

Installation 

sudo apt-get install squid

Configuration File path

/etc/squid3/squid.conf

Start Squid

sudo start squid3

HTTP Proxy 127.0.0.1 Port 3128

Access Log File path

/var/log/squid3/access.log

To check whether we are on cache.

TCP_MISS/200 means that the requested document was not in the cache but it could fetch it OK from the web server. The direct at the end says that the file was fetched from the webserver.
TCP_IMS_HIT/304 means that the client asked if the file has changed, and squid checked its date/time on the webserver and found it had not changed, so it gave a copy of the file to the client out of its local cache.

/var/log/squid3/cache.log

ref :