Accessing Oracle with Python

Ubuntu 14.04
$ sudo apt-get install python-dev
$ sudo pip install --upgrade pip
$ sudo -H pip install JayDeBeApi
Refer: https://pypi.org/project/JayDeBeApi/
Another option, untried: http://cx-oracle.readthedocs.io/en/latest/installation.html#quick-start-cx-oracle-installation

Python Request to Curl

Nice little utility to convert your Python Requests to Curl Statements.

Refer: https://github.com/ofw/curlify

Install
$ sudo pip install curlify
Usage

import curlify
import requests

response = requests.get("http://google.com")
print(curlify.to_curl(response.request))

Dust versus AngularJS

JavaScript Framework Dust:
http://akdubya.github.io/dustjs/#guide

AngularJS versus Dust
Refer: http://stackoverflow.com/questions/15336187/what-is-the-difference-between-angularjs-and-dust-js

Dust.js is purely a templating module. So, it allows the combination of json with a template to deliver html output.

Angular.js is client side framework that allows binding of logic to variables defined in a template (your page).

So, with dust.js you are responsible for deciding when to run the json through the template. Typically you feed in the json on the server (or client) and ask it to render the results.

With angular.js when the model (the json) changes the framework re-renders as appropriate. Triggers for that change could be user actions (such as filling a form in) or it could be due to loading some fresh json from a service.

Typically you would use angular.js if you want a single page JS app (think gmail). dust.js is perhaps more akin to a traditional approach with multi pages with content driven by passing in json.

You could even use the both of them in tandem - server side rendering using dust.js with dynamic client side logic in angular.js.

Installing NPM and NodeJS in Ubuntu

Possible Solution (Not Tested):
http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/

Updating NPM
Refer: http://stackoverflow.com/questions/23393707/how-to-update-npm

This will update npm using npm itself:

# This is for initial installation
$ sudo npm install npm -g

# This is for upgrade
$ sudo npm update npm -g

From article: If you are stuck, try sudo npm update npm -g. All credit goes to Tim Castelijns. I have tested it on ubuntu 14.04, npm 1.3.10

Note that if you are using nvm for managing multiple versions in your local dev environment for e.g. testing purposes, all your installed versions (listed by nvm ls) are in ~/.nvm, hence you just omit system wide installation (i.e. omit sudo):

$ npm install npm -g

Updated version of NodeJS - Chris Lea
Refer: https://nodesource.com/blog/chris-lea-joins-forces-with-nodesource

Debugging Perl Inside Eclipse

Refer: http://perlmaven.com/padwalker

$ sudo apt-get install libpadwalker-perl

In Eclipse

Help, Install New Software

Refer: http://www.epic-ide.org/guide/ch01s02.php

For "Work with:", click "Add" button

Name: EPIC
Location: http://e-p-i-c.sf.net/updates

Choose "EPIC Main Components"
Next
Next
Accept
Finish

Install the software and restart

Make sure to create a special Perl workspace, and don't re-use your default workspace

Failed Notes from Archive

Run the following command, and kept hitting enter for all responses, added all repositories.
$ perl -MCPAN -e shell

Then run the following command in CPAN
cpan> install PadWalker
cpan> exit

Perl and SQLite Example along with MongoDB

Within Ubuntu using:SQLiteman

You'll need the DBI package, if not installed do the following within Ubuntu
sudo perl -MCPAN -e shell
cpan> install DBI
cpan> install DBD::SQLite module

Simple Perl script example, creating and inserting into a table: example1.pl

Installing Driver for MongoDB is just as easy, but be warned, it takes a long time to install.

sudo perl -MCPAN -e shell
cpan> install MongoDB::Connection

 

Drools Guides

This should suffice what you need to build. Please don’t hesitate to discuss this with me if you have any doubts. We have spring in our application so we should look into integrating directly with Spring and try to keep it very light weight.

http://www.drools.org/learn/documentation.html

http://www.javacodegeeks.com/2012/02/jboss-drools-getting-started.html

http://toomuchcoding.blogspot.com/2013/01/drools-integration-with-spring-vs.html

http://mytechnorage.blogspot.com/2014/10/drools-6-integration-with-spring-mvc-4.html

Using perl to get newest file in folder


$iisdir = '\\\\myfolder\\subfolder\\';
opendir LOGS, "$iisdir" or die "Directory error for IIS LOGS: $!\n";
my @files = grep /\.txt$/, readdir LOGS;
@files = sort { -M $a <=> -M $b } @files;
$active_log = $files[-1];
print "active log: $active_log\n\n";