Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 -XDELETE 'http://localhost:9200/test' | |
echo | |
curl -XPUT 'http://localhost:9200/test' | |
echo | |
echo | |
curl -XPUT 'http://localhost:9200/test/_mapping/message' -d ' | |
{ | |
"message" : { | |
"properties" : { | |
"message" : {"type" : "string", "store" : "true" }, |
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
function openInWebView(url) | |
{ | |
var anchor = document.createElement('a'); | |
anchor.setAttribute('href', url); | |
//anchor.setAttribute('target', '_self'); | |
var dispatch = document.createEvent('HTMLEvents') | |
dispatch.initEvent('click', true, true); | |
anchor.dispatchEvent(dispatch); |
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
Exception in SMS Gateway: incompatible character encodings: ASCII-8BIT and US-ASCII at /Users/Bek/ruby-smpp/lib/smpp/pdu/base.rb:91:in `initialize' | |
/Users/Bek/ruby-smpp/lib/smpp/pdu/submit_sm.rb:49:in `initialize' | |
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `new' | |
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `send_mt' | |
sample_gateway.rb:46:in `send_mt' | |
sample_gateway.rb:27:in `receive_line' | |
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/em/protocols/linetext2.rb:64:in `receive_data' | |
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' | |
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' | |
sample_gateway.rb:61:in `block in start' |
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
Exception in SMS Gateway: incompatible character encodings: ASCII-8BIT and US-ASCII at /Users/Bek/ruby-smpp/lib/smpp/pdu/base.rb:91:in `initialize' | |
/Users/Bek/ruby-smpp/lib/smpp/pdu/submit_sm.rb:49:in `initialize' | |
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `new' | |
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `send_mt' | |
sample_gateway.rb:46:in `send_mt' | |
sample_gateway.rb:27:in `receive_line' | |
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/em/protocols/linetext2.rb:64:in `receive_data' | |
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' | |
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' | |
sample_gateway.rb:61:in `block in start' |
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
require 'logger' | |
require 'openssl' | |
class UcellGateway | |
#dunno what this is, but it's yours :) | |
include MessageFilter | |
def initialize | |
@logger = Logger.new |
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 MessageSender | |
def self.redis | |
@redis ||= EM::Hiredis.connect | |
end | |
def self.next | |
if UcellGateway.connection_exists == true | |
redis.blpop("ucell-out", 0) do |item| #blpop on redis return an array with key(ucell-out) and value | |
if item[1] |
NewerOlder