This file contains 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
# perl dancer includes JSON::XS | |
# so returning JSON::XS: | |
# to return true, JSON::XS::true | |
get '/works' => { | |
return to_json {success => JSON::XS::true}; | |
} | |
Response: | |
--------- |
This file contains 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
//PUT indexName | |
{ | |
"mappings": { | |
"type": { | |
"properties": { | |
"filepath": { | |
"type": "string", | |
"index": "not_analyzed" | |
} | |
} |
This file contains 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
# OS Requirements: Centos 6+ & Java 1.8+ | |
Step1: | |
------ | |
------ | |
Installing Java | |
--------------- | |
Download JDK from : http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html |
This file contains 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
//while starting server pass --max-old-space-size=1024. | |
//this allocates 1024MB to node.js which is 1GB. Increase the number according to your hardware needs. | |
node --max-old-space-size=1024 controllers/aggregate_counters.js | |
// if using forever | |
forever start -c 'node --max-old-space-size=1024' your_script.js |
This file contains 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
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
uri = URI('https://example.com/rest/api/2/1') | |
Net::HTTP.start(uri.host, uri.port, | |
:use_ssl => uri.scheme == 'https', | |
:verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http| |
This file contains 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
//Must include these DHTMLX Pro Javascripts | |
'dhtmlxcommon', | |
'dhtmlxgrid', | |
'dhtmlxgridcell', | |
'dhtmlxgrid_json', | |
'dhtmlxgrid_splt', | |
'dhtmlxgrid_pgn', | |
'dhtmlxtoolbar', | |
'dhtmlxgrid_srnd', | |
This file contains 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
<div id='grid-region'> | |
</div> | |
<div class="loading-image" id="table-ajax-loader"> </div> <!-- Add a Spinner if needed --> | |
<div> <!-- Style this if needed --> | |
<div id="pagingArea"></div> | |
<div id="infoArea"></div> | |
</div> |
This file contains 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
/* Display An arrow mark */ | |
.div:before{ | |
content: ""; | |
display: block; | |
position: relative; | |
top: 20px; | |
left: -20px; | |
width: 0; | |
height: 0; |