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
def self.memmory(app_name, url) | |
pid, size = `ps ax -o pid,rss | grep -E "^[[:space:]]*#{$PROCESS_ID}"`.strip.split.map(&:to_i) | |
size_in_mb = size / 1024.0 | |
{ pid: pid, app: app_name, size: size_in_mb, url: url, server_time: Time.now } | |
end |
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
<? | |
$body = file_get_contents('php://input'); | |
#$data = json_decode($body, true); #decode JSON string. | |
file_put_contents("jumpseller_posts.txt", date("Y-m-d H:i:s")."\n".$body, FILE_APPEND); | |
?> |
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
countries: | |
PT: Portugal | |
IE: Ireland | |
GB: UK | |
CA: Canada | |
US: United States | |
AF: Afghanistan | |
AL: Albania | |
DZ: Algeria | |
AS: American Samoa |
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 'uri' | |
require 'net/https' | |
require 'ostruct' | |
require 'rubygems' | |
require 'yaml' | |
invoicexpressyml ||= YAML.load_file("config/invoicexpress.yml") | |
invoicexpresscfg = invoicexpressyml["development"] | |
host = [invoicexpresscfg["screen_name"], invoicexpresscfg["host"]].join(".") | |
api_key = invoicexpresscfg["api_key"] |
NewerOlder