Read the blog at http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/
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 QuickfixjMessageJsonTransformer { | |
private DataDictionary dataDictionary; | |
public QuickfixjMessageJsonTransformer(){}; | |
public QuickfixjMessageJsonTransformer(DataDictionary dd) { | |
this.dataDictionary = dd; | |
} | |
public String transform(Exchange exchange) { | |
// camel message | |
org.apache.camel.Message in = exchange.getIn(); |
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
#To be able to deploy the app as service in openshift we can follow various routes. | |
#I have follwed the binary build and deployment method.. | |
https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/get_started#source_to_image_s2i_build | |
#Other methods are also discussed in the recoommened guide above for being able to do deployment. for private source repository | |
Image secret is need while doing s2i builds from the repo | |
#https://developers.redhat.com/blog/2017/02/23/getting-started-with-openshift-java-s2i/ provides other useful ways of deployment |
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.levelsbeyond; | |
import java.util.Date; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Thread Test |
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
#!/bin/bash | |
# Copyright bitly, Aug 2011 | |
# written by Jehiah Czebotar | |
DATAFILE="/var/tmp/nagios_check_forkrate.dat" | |
VALID_INTERVAL=600 | |
OK=0 | |
WARNING=1 | |
CRITICAL=2 |
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
""" | |
Simple Linear Probabilistic Counters | |
Credit for idea goes to: | |
http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html | |
http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/ | |
Installation: | |
pip install smhasher | |
pip install bitarray |
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
# DATA FRAME OPERATIONS IN R | |
# Create data frame | |
# A dataset is ~ table (list of vectors) | |
id <- c(1,2,3) | |
name <- c("John", "Kirk", "AJ") | |
age <- c(21,27,18) | |
employees <- data.frame(ID=id, Name=name, Age=age) | |
employees |
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
Munin Passenger Plug-in Installation | |
Configure the passenger plug-ins according the the guide on http://www.alfajango.com/blog/how-to-monitor-your-railspassenger-app-with-munin/ | |
NOTE: restart munin after implementing the following changes for Single-User RVM | |
sudo nano /etc/munin/plugin-conf.d/munin-node | |
[passenger_*] | |
user root |
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
server { | |
root /var/www/example.com/static; | |
server_name example.com; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; | |
try_files /maintenance.html @proxy; | |
location @proxy { | |
proxy_pass http://127.0.0.1:10001; |
NewerOlder