Skip to content

Instantly share code, notes, and snippets.

server {
listen 17743;
server_name axion.webfactional.com;
location / {
proxy_pass http://127.0.0.1:13459;
}
location /static/ {
root /home/axion/webapps/taxicab_fees/current/;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
@minostro
minostro / gist:11387989
Last active February 18, 2019 16:43
Configuring Nginx on Webfaction

1.- Get into the src folder, download & extract nginx source

  • cd ~/src
  • curl -O http://nginx.org/download/nginx-1.7.0.tar.gz
  • tar -xzvf nginx-1.7.0.tar.gz
  • cd nginx-1.7.0

2.- Configuring the source

./configure --prefix=$HOME/local/nginx \

(ns intl-mbus.core
(:import (javax.jms Connection MessageProducer Queue Session TextMessage)
(org.hornetq.api.core TransportConfiguration)
(java.util HashMap Map)
(org.hornetq.api.jms HornetQJMSClient JMSFactoryType)
(org.hornetq.jms.client HornetQConnectionFactory)
(org.hornetq.jms.client HornetQConnectionFactory))
(:require [cheshire.core :refer :all]))
(def props (java.util.HashMap. {"host" "10.6.81.225" "port" (Integer. 10255)}))
private HornetQJMSConnectionFactory getConnectionFactory() {
Map<String, Object> transportParams = new HashMap<String, Object>(5);
transportParams.put("host", "10.6.81.225");
transportParams.put("port", 10255);
transportParams.put("use-nio", "true");
TransportConfiguration tc = new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory", transportParams);
HornetQJMSConnectionFactory connectionFactory = HornetQJMSClient.createConnectionFactoryWithoutHA(tc);
connectionFactory.setReconnectAttempts(-1);
connectionFactory.setRetryInterval(1000);
@minostro
minostro / gist:7714901
Last active December 29, 2015 19:08
Select the points belonging to a given checkpoint area. First, I create the tables checkpoint and point. Then, two checkpoints are created, and five points are inserted. Finally, I define the query that fulfill the statement.
CREATE TABLE public.checkpoint (
id SERIAL PRIMARY KEY,
geom GEOMETRY(Point, 26910),
radio int,
name VARCHAR(128)
);
CREATE INDEX public.checkpoint_geom_index
ON public.checkpoint
USING GIST (geom);
(ns immutant-demo-fntest.integration-test
(:use clojure.test)
(:require [clj-http.client :as http]
[fntest.core :as fnt]))
; (deftest first-integration-test
; (testing "jbos"
; (is (= "hola" (util/app-uri)))))
@minostro
minostro / gist:7665585
Created November 26, 2013 20:25
jboss log
14:24:35,683 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
14:24:35,908 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
14:24:35,952 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss AS 7.2.x.slim.incremental.6 "Janus" starting
14:24:35,957 DEBUG [org.jboss.as.config] (MSC service thread 1-6) Configured system properties:
awt.nativeDoubleBuffering = true
awt.toolkit = apple.awt.CToolkit
file.encoding = MacRoman
file.encoding.pkg = sun.io
file.separator = /
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
(ns immutant-demo-fntest.integration-test
(:use clojure.test)
(:require [clj-http.client :as http]
[fntest.core :as fnt]
[immutant.util :as util]))
; (use-fixtures :once
; (compose-fixtures
; fnt/with-jboss
; (fnt/with-deployment "immutant-demo-fntest.clj" {:root "./", :context-path "/foo"})))
@minostro
minostro / gist:7663704
Created November 26, 2013 18:50
full jboss log
2:39:43,220 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
12:39:43,453 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
12:39:43,499 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015899: JBoss AS 7.2.x.slim.incremental.6 "Janus" starting
12:39:43,505 DEBUG [org.jboss.as.config] (MSC service thread 1-5) Configured system properties:
awt.nativeDoubleBuffering = true
awt.toolkit = apple.awt.CToolkit
file.encoding = MacRoman
file.encoding.pkg = sun.io
file.separator = /
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16