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
module Properties | |
class << self | |
def load_properties(properties_filename) | |
properties = {} | |
File.open(properties_filename, 'r') do |properties_file| | |
properties_file.read.each_line do |line| | |
line.strip! | |
if (line[0] != ?# and line[0] != ?=) | |
i = line.index('=') | |
if (i) |
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
package com.inlet.delivery; | |
import java.io.InputStream; | |
import java.util.List; | |
import javax.ws.rs.core.MediaType; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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 class="container ... "> | |
<div class=" | |
component ... ${properties.step < 1 ? 'inactive' : ''} | |
${properties.step === 1 ? 'active' : ''} | |
${properties.step > 1 ? 'completed' : ''} | |
"> | |
STEP 1 | |
</div> | |
<div class=" | |
component ... ${properties.step < 2 ? 'inactive' : ''} |
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 class="container ... "> | |
<div class="component ... ${getStepClass(properties.step, 1)}"> | |
STEP 1 | |
</div> | |
<div class="component ... ${getStepClass(properties.step, 2)}"> | |
STEP 2 | |
</div> | |
<div class="component ... ${getStepClass(properties.step, 3)}"> | |
STEP 3 | |
</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
<div class="container ... "> | |
<div class="component ... ${getStepClass(properties.step, 1}"> | |
STEP 1 | |
</div> | |
<div class="component ... ${getStepClass(properties.step, 2}"> | |
STEP 2 | |
</div> | |
<div class="component ... ${getStepClass(properties.step, 3}"> | |
STEP 3 | |
</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
module Util | |
class << self | |
def first_line file_name | |
File.open(file_name, 'r') do |f| | |
p f.gets | |
end | |
rescue Errno::ENOENT => ex | |
"Do the file creation: #{ex.to_s}" | |
end | |
end |
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
module Util | |
class << self | |
def first_line file_name | |
File.open(file_name, 'r') do |f| | |
p f.gets | |
end | |
rescue Errno::ENOENT => ex | |
handle_error(ex) | |
end |
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
import * as path from 'path'; | |
const WebpackMd5Hash = require('webpack-md5-hash'); | |
const CompressionPlugin = require('compression-webpack-plugin'); | |
import * as webpack from 'webpack'; | |
export const getWebpackProdConfigPartial = function(projectRoot: string, appConfig: any) { | |
return { | |
debug: false, | |
devtool: 'source-map', | |
output: { |
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
public class KafkaOutputBean { | |
public void printKafkaBody(String body) { | |
try { | |
Notification message = new ObjectMapper().readValue(body, Notification.class); | |
System.out.println("KafkaBody result >>>>> " + message.toString()); | |
} catch (JsonParseException e) { | |
System.out.println(body + " cannot be marshalled to a Notification.class"); | |
} catch (JsonMappingException e) { | |
e.printStackTrace(); |
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
@Controller | |
@ResponseBody | |
@RequestMapping("/message") | |
public class MessageController { | |
ObjectMapper mapper = new ObjectMapper(); | |
@Autowired | |
CamelContext camelContext; |