gx: open url under cursor
gg=G: indent file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amitava:java amitava$ ./sample.sh demo tmr://10.21.235.186:5084/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://search.maven.org/#api | |
find /usr/local/Cellar/maven/3.3.9/libexec -name \*.jar -exec shasum {} \; | \ | |
cut -d' ' -f 1 | \ | |
xargs -n 1 -I@ \ | |
curl -s 'http://search.maven.org/solrsearch/select?q=1:"@"&wt=json' | \ | |
jq . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://repo.maven.apache.org/maven2/archetype-catalog.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{application, tcp_rpc, | |
[{description, "RPC server for Erlang and OTP in action"}, | |
{vsn, "0.1.0"}, | |
{modules, [tr_app, | |
tr_sup, | |
tr_server]}, | |
{registered, [tr_sup]}, | |
{applications, [kernel, stdlib]}, | |
{mod, {tr_app, []}} | |
]}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
entry: './app.js', | |
output: { | |
path: __dirname, | |
filename: 'bundle.js', | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, |
$ mkdir react-redux-webpack && cd react-redux-webpack
$ npm init . -f
$ npm i --save react react-dom redux react-redux immutable
$ npm i --save-dev webpack babel-loader babel-preset-es2015 babel-preset-stage-2 babel-preset-react # babel-preset-stage-0 for lower
$ # to add es7 async features
$ npm i -D babel-plugin-syntax-async-functions babel-plugin-transform-regenerator babel-polyfill
$ npm i -S babel-polyfill
Configure webpack.config.js
Load data from one db/file to another
- pgloader - http://pgloader.io/
There are four different ways one can deploy a webapp to Tomcat.
If $TOMCAT_HOME
is the Tomcat top-level directory:
- Copy the war file foo.war or exploded war directory to
$TOMCAT_HOME/webapps
- Create a context file context.xml in the webapp’s META-INF/ directory that contains a fragment that describes the webapp deployment
- Add a
<Context>
element to the<Host>
element in Tomcat’s server.xml that describes the webapp deployment, including docBase. docBase is a attribute that locates the war file or exploded war directory in the filesystem. - Create a context file foo.xml in
$TOMCAT_HOME/conf/Catalina/localhost/foo.xml
that contains a fragment that describes the webapp deployment, including docBase.
Sample $TOMCAT_HOME/conf/Catalina/localhost/foo.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PostgreSQL | |
/subsystem=datasources/data-source={{data-source-name}}:add(jndi-name="{{jndi-name}}",driver-name="postgres",connection-url="{{jdbc-uri}}",user-name={{username}},password={{password}},enabled=true,use-java-context=true,background-validation=false,validate-on-match=true,valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker",exception-sorter-class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter",min-pool-size=1,max-pool-size=10,idle-timeout-minutes=3) | |
# SQL Server | |
/subsystem=datasources/data-source={{data-source-name}}:add(jndi-name="{{jndi-name}}",driver-name="sqlserver",connection-url="{{jdbc-uri}}",user-name={{username}},password={{password}},enabled=true,use-java-context=true,background-validation=false,validate-on-match=true,valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker",min-pool-size=1,max-pool-size=10,idle-timeout-minutes=3) | |
# Oracl |