Skip to content

Instantly share code, notes, and snippets.

#
# dnssio (demo)
#
tango_enable="NO"
tango_appfile="/usr/zyxmasta/hosting/nse-demo/app.psgi"
tango_owner="nsmasta"
tango_group="nsmasta"
tango_listen="--listen :3050"
tango_flags="--workers 2 --error-log /usr/zyxmasta/hosting/nse-demo/logs/instance.log"
tango_pidfile="/var/run/tango.pid"
#!/bin/sh
#
# PROVIDE: psgiapp
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
case "$0" in
/etc/rc*)
#!/usr/bin/env perl
use Test::Spec;
{
package Foo::Bar;
use LWP::UserAgent;
sub new {
@Wu-Wu
Wu-Wu / haproxy.conf
Created June 29, 2013 14:44
HAProxy configuration to deploy PSGI application
#
# application entry points
# https://www.example.com/ (production)
# https://demo.example.com/ (demo/lite production)
# https://devel.example.com/ (development)
#
# static content served by nginx server
# http://app-be1.example.net:4xxx/
# http://app-be2.example.net:4xxx/
#
@Wu-Wu
Wu-Wu / gist:5577823
Created May 14, 2013 17:29
testing Dancer::Session::Redis and Dancer::Serializer::JSON
#
# Dancer::Session::Redis
# Dancer::Serializer::JSON
#
use strict;
use warnings;
use Dancer;
# set up session
set redis_session => {
@Wu-Wu
Wu-Wu / pkgs-info
Last active December 16, 2015 02:19
"required by/depends on" for each installed perl 5 package on FreeBSD
#!/bin/sh
PKGS=`pkg_info | grep ^p5- | awk '{print $1}'`
for pkg in $PKGS;
do
echo "Package ${pkg}"
echo "------------------------------------------------------"
echo "Required by:"
pkg_info -R $pkg | grep -v Information | grep -v Required | grep -v "^$"