Permalink
Browse files

the rest

  • Loading branch information...
1 parent 56a7193 commit e67a55acdf84590bc28b265eb8c7d515f404475a @f00li5h committed Sep 21, 2011
View
@@ -0,0 +1,17 @@
+name Patch, Publish or Paw.
+theme somekit
+attachment_dir /opt/mojomojo/somekit/attach
+index_dir /opt/mojomojo/somekit/index
+
+<Model::DBIC>
+ <connect_info>
+ dsn dbi:SQLite:/opt/mojomojo/somekit/mojomojo.db
+ user db_user
+ passwrd db_password
+ </connect_info>
+</Model::DBIC>
+<View::TT>
+ # INCLUDE_PATH /opt/mojomojo/root
+ # INCLUDE_PATH /usr/share/perl5/MojoMojo/root
+ # LOAD_PERL 1
+</View::TT>
View
66 README
@@ -0,0 +1,66 @@
+This is some useful stuff for mojomojo. You might find them useful too.
+
+SUPER USEFUL THINGS ----------------------------------------------------------
+
+mojomojo_cli
+ - this is my super sexy App::Cmd for doing mojomojo stuff
+ - it is half code lifted from misc util scripts in the main mojo repo
+ and half itch scratching
+
+ - import command is super helpful for loading up:
+ - directories of markdown files
+ - mediawiki xml files
+
+ - I plan on patching in stuff for converting markups using
+ Text::Markup (that means I'll be loading html)
+
+ - This thing is going to destroy everything in your database, on your
+ file system and in your environment. It contains bruit force and
+ ignorance, at best.
+
+DEBIAN BITS ------------------------------------------------------------------
+
+The very sensual jawnsy rolled together a debian package.
+What a handy critter jawnsy is!
+
+debian-init-script
+ - edit it to point to fcgi_manage.pl below
+ - copy this to this in /etc/init.d
+ - then symlink it in /etc/rc2.d/S03fcgi_manage.pl
+
+fcgi_manage.pl
+ - this is a tampered wtih mojomojo_fastcgi_manage.pl
+ (only for the sake of changing conf =>'s path)
+
+ - I feel like hacking this to be more useful and pushing upstream
+ is a more helpful idea ...
+
+mojomojo_fastcgi_manage.yml
+ - the config for fcgi_manage.pl
+
+mojomojo-ngnix-vhost
+ - this is from /etc/nginx/sites-available/
+ - it has the action to go with
+
+
+SOME OTHER THINGS ------------------------------------------------------------
+
+root/{static,}/themes/somekit
+
+ - the theme for my blogothing!
+
+ - I symlinked crap in /usr/share/perl5/MojoMojo/root/{static,}/themes
+
+ - it uses SimpleGrid.info 's trickery to be friendly to assorter
+ browsing things.
+
+ - logging in gets you a really fucked up view of everything
+ because I don't care. nobody gets to be logged in but me, damn it.
+
+
+MojoMojo.conf
+
+ - my mojomojo config
+ - i'm thinking of templating it for the sake of lotsa mojomojos
+ - sqlite and indexes in /opt/mojomojo/somekit
+ (this directory needs to be writable by the httpd)
View
@@ -0,0 +1,15 @@
+:
+### BEGIN INIT INFO
+# Provides: mojomojo
+# Required-Start: $remote_fs $syslog $time
+# Required-Stop: $remote_fs $syslog $time
+# Should-Start:
+# Should-Stop: $named
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: wiki-thing
+# Description: wiki-thing
+### END INIT INFO
+
+# cd /opt/mojomojo
+su - mojomojo -c "cd /opt/mojomojo; MOJOMOJO_CONFIG=./MojoMojo.conf ./fcgi_manage.pl $*"
View
@@ -0,0 +1,42 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+ if 0; # not running under some shell
+
+=head1 NAME
+
+mojomojo_fastcgi_manage.pl - script to start/stop/restart mojomojo fastcgi instance
+
+=cut
+
+eval { use FCGI::Engine::Manager };
+if ($@) { die "You need to install FCGI::Engine to run this script\n"; }
+
+my $m =
+ FCGI::Engine::Manager->new( conf => '/opt/mojomojo/mojomojo_fastcgi_manage.yml' );
+
+use lib qw[ lib ];
+my ( $command, $server_name ) = @ARGV;
+$m->start($server_name) if $command eq 'start';
+$m->stop($server_name) if $command eq 'stop';
+$m->restart($server_name) if $command eq 'restart';
+$m->graceful($server_name) if $command eq 'graceful';
+print $m->status($server_name) if $command eq 'status';
+
+=head1 USAGE
+
+NOTE: Run this script from the parent directory so path to configuration is correct.
+
+ perl script/mojomojo_fastcgi_manage.pl start
+ perl script/mojomojo_fastcgi_manage.pl stop
+ perl script/mojomojo_fastcgi_manage.pl restart mojomojo.server
+
+
+=head1 Web Server Configuration
+
+=head2 Apache
+
+In an apache conf file:
+
+FastCgiExternalServer /tmp/mojomojo.fcgi -socket /tmp/mojomojo.socket
+Alias /wiki /tmp/mojomojo.fcgi/
View
@@ -0,0 +1,48 @@
+
+server {
+ listen 80;
+ server_name f00li5h.pin21.com;
+
+ location @proxy {
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass http://backendurl;
+ }
+
+
+ # lazy and frustrated
+ fastcgi_param QUERY_STRING $query_string;
+ fastcgi_param REQUEST_METHOD $request_method;
+ fastcgi_param CONTENT_TYPE $content_type;
+ fastcgi_param CONTENT_LENGTH $content_length;
+
+ # Catalyst requires setting PATH_INFO (instead of SCRIPT_NAME) to $fastcgi_script_name
+ fastcgi_param PATH_INFO $fastcgi_script_name;
+ fastcgi_param SCRIPT_NAME /;
+ fastcgi_param REQUEST_URI $request_uri;
+ fastcgi_param DOCUMENT_URI $document_uri;
+ fastcgi_param DOCUMENT_ROOT $document_root;
+ fastcgi_param SERVER_PROTOCOL $server_protocol;
+
+ fastcgi_param GATEWAY_INTERFACE CGI/1.1;
+ fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
+
+ fastcgi_param REMOTE_ADDR $remote_addr;
+ fastcgi_param REMOTE_PORT $remote_port;
+ fastcgi_param SERVER_ADDR $server_addr;
+ fastcgi_param SERVER_PORT $server_port;
+ fastcgi_param SERVER_NAME $server_name;
+
+
+ location /static {
+ root /usr/share/perl5/MojoMojo/root/;
+ }
+
+ rewrite /.static/(.*) /static/$1;
+ location / {
+ include fastcgi_params;
+ fastcgi_pass unix:/tmp/mojomojo.sock;
+ }
+}
View
@@ -2,6 +2,9 @@
use lib qw[ lib ];
+# this fudgery is here to allow App::Cmd to skip over the plugins of sub-commands
+# i suspect that i can do this by making a sub-command an App::Cmd,
+# but writing software is haaard
*App::Cmd::_command = sub {
my ($self, $arg) = @_;
return $self->{command} if ref $self and $self->{command};
@@ -0,0 +1,8 @@
+---
+- name: "foo.server"
+ server_class: "FCGI::Engine::Manager::Server"
+ scriptname: "/usr/bin/mojomojo_fastcgi.pl"
+ nproc: 1
+ pidfile: "/tmp/mojomojo.pid"
+ socket: "/tmp/mojomojo.sock"
+ additional_args: [ "-I", "lib/" ]
@@ -0,0 +1,12 @@
+.banner-wrap {
+ background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Black_Paw.svg/220px-Black_Paw.svg.png);
+ background-repeat:no-repeat;
+ background-position:90% -70%;
+
+}
+
+.banner-wrap .banner h1 a {
+ background: none;
+ padding:0;
+}
+
@@ -0,0 +1,22 @@
+/* SimpleGrid - a fork of CSSGrid by Crowd Favorite (https://github.com/crowdfavorite/css-grid)
+ * http://simplegrid.info
+ * by Conor Muirhead (http://conor.cc) of Early LLC (http://earlymade.com)
+ * License: http://creativecommons.org/licenses/MIT/ */
+
+/* Containers */
+body { font-size: 1.125em; }
+.grid{ width:1206px; }
+
+/* 6-Col Grid Sizes */
+.slot-0,.slot-1,.slot-2,.slot-3,.slot-4,.slot-5{ width:176px; } /* Sixths */
+.slot-0-1,.slot-1-2,.slot-2-3,.slot-3-4,.slot-4-5{ width:382px; } /* Thirds */
+.slot-0-1-2-3,.slot-1-2-3-4,.slot-2-3-4-5{ width:794px; } /* Two-Thirds */
+.slot-0-1-2-3-4,.slot-1-2-3-4-5{ width:1000px; } /* Five-Sixths */
+
+/* 4-Col Grid Sizes */
+.slot-6,.slot-7,.slot-8,.slot-9{ width:279px; } /* Quarters */
+.slot-6-7-8,.slot-7-8-9{ width:897px; } /* Three-Quarters */
+
+/* 6-Col/4-Col Shared Grid Sizes */
+.slot-0-1-2,.slot-1-2-3,.slot-2-3-4,.slot-3-4-5, .slot-6-7,.slot-7-8,.slot-8-9{ width:588px; } /* Halves */
+
@@ -0,0 +1,56 @@
+.banner-wrap {
+ text-align: center;
+ background: #ffc;
+ border-bottom: 1px solid #ccc;
+ padding: 0 10px 1em;
+ margin-bottom: 1em;
+}
+#the-top #navigation-hints { /* float when the center kicks in */
+ float:right;
+}
+
+.banner-wrap .banner h1 a {
+ background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Black_Paw.svg/40px-Black_Paw.svg.png);
+ background-position:0 50%;
+ background-repeat:no-repeat;
+ padding-left:50px;
+}
+
+span.minus { display:inline; padding:0;}
+span.abstract {
+ margin: inherit;
+ display:inline;
+
+ color: #444;
+ margin-left:1em;
+ text-decoration: none;
+}
+
+
+/* the columns kick in here too, so we'll align them */
+#foot-navigation .popular {text-align:right}
+#foot-navigation .categories {text-align:center}
+#foot-navigation .series {text-align:center}
+#foot-navigation .misc {}
+
+
+.intro {
+ font-size: 1.75em;
+ font-family: sommet-slab-1, sommet-slab-2, Georgia, serif;
+ line-height: 1.1em;
+ max-width: none;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: sommet-slab-1, sommet-slab-2, Georgia, serif;
+ font-weight: normal;
+ line-height: 1.2em;
+ padding: 0.5em 0 0.25em;
+}
+
+.grid {
+ padding: 0 20px;
+}
+
+html { overflow: -moz-scrollbars-vertical; }
+html { overflow-x: auto; }
@@ -0,0 +1,33 @@
+/* SimpleGrid - a fork of CSSGrid by Crowd Favorite (https://github.com/crowdfavorite/css-grid)
+ * http://simplegrid.info
+ * by Conor Muirhead (http://conor.cc) of Early LLC (http://earlymade.com)
+ * License: http://creativecommons.org/licenses/MIT/ */
+
+/* Containers */
+body { font-size: 0.875em; padding: 0; }
+.grid{ margin:0 auto; padding: 0 10px; width:700px; }
+.row{ clear:left; }
+
+/* Slots Setup */
+.slot-0,.slot-1,.slot-2,.slot-3,.slot-4,.slot-5,.slot-0-1,.slot-0-1-2,.slot-0-1-2-3,.slot-0-1-2-3-4,.slot-0-1-2-3-4-5,.slot-1-2,.slot-1-2-3,.slot-1-2-3-4,.slot-1-2-3-4-5,.slot-2-3,.slot-2-3-4,.slot-2-3-4-5,.slot-3-4,.slot-3-4-5,.slot-4-5,.slot-6,.slot-7,.slot-8,.slot-9,.slot-6-7,.slot-6-7-8,.slot-6-7-8-9,.slot-7-8,.slot-7-8-9,.slot-8-9{ display:inline; float:left; margin-left:20px; }
+
+/* 6-Col Grid Sizes */
+.slot-0,.slot-1,.slot-2,.slot-3,.slot-4,.slot-5{ width:100px; } /* Sixths */
+.slot-0-1,.slot-1-2,.slot-2-3,.slot-3-4,.slot-4-5{ width:220px; } /* Thirds */
+.slot-0-1-2-3,.slot-1-2-3-4,.slot-2-3-4-5{ width:460px; } /* Two-Thirds */
+.slot-0-1-2-3-4,.slot-1-2-3-4-5{ width:580px; } /* Five-Sixths */
+
+/* 4-Col Grid Sizes */
+.slot-6,.slot-7,.slot-8,.slot-9{ width:160px; } /* Quarters */
+.slot-6-7-8,.slot-7-8-9{ width:520px; } /* Three-Quarters */
+
+/* 6-Col/4-Col Shared Grid Sizes */
+.slot-0-1-2,.slot-1-2-3,.slot-2-3-4,.slot-3-4-5, .slot-6-7,.slot-7-8,.slot-8-9{ width:340px; } /* Halves */
+.slot-0-1-2-3-4-5, .slot-6-7-8-9{ width: 100%; } /* Full-Width */
+
+/* Zeroing Out Leftmost Slot Margins */
+.slot-0,.slot-0-1,.slot-0-1-2,.slot-0-1-2-3,.slot-0-1-2-3-4,.slot-0-1-2-3-4-5,.slot-6,.slot-6-7,.slot-6-7-8,.slot-6-7-8-9,.slot-1 .slot-1,.slot-1-2 .slot-1,.slot-1-2 .slot-1-2,.slot-1-2-3 .slot-1,.slot-1-2-3 .slot-1-2,.slot-1-2-3 .slot-1-2-3,.slot-1-2-3-4 .slot-1,.slot-1-2-3-4 .slot-1-2,.slot-1-2-3-4 .slot-1-2-3,.slot-1-2-3-4 .slot-1-2-3-4,.slot-1-2-3-4-5 .slot-1,.slot-1-2-3-4-5 .slot-1-2,.slot-1-2-3-4-5 .slot-1-2-3,.slot-1-2-3-4-5 .slot-1-2-3-4,.slot-1-2-3-4-5 .slot-1-2-3-4-5,.slot-2 .slot-2,.slot-2-3 .slot-2,.slot-2-3 .slot-2-3,.slot-2-3-4 .slot-2,.slot-2-3-4 .slot-2-3,.slot-2-3-4 .slot-2-3-4,.slot-2-3-4-5 .slot-2,.slot-2-3-4-5 .slot-2-3,.slot-2-3-4-5 .slot-2-3-4,.slot-2-3-4-5 .slot-2-3-4-5,.slot-3 .slot-3,.slot-3-4 .slot-3,.slot-3-4 .slot-3-4,.slot-3-4-5 .slot-3,.slot-3-4-5 .slot-3-4,.slot-3-4-5 .slot-3-4-5,.slot-4 .slot-4,.slot-4-5 .slot-4,.slot-4-5 .slot-4-5,.slot-5 .slot-5,.slot-7 .slot-7,.slot-7-8 .slot-7,.slot-7-8 .slot-7-8,.slot-7-8-9 .slot-7,.slot-7-8-9 .slot-7-8,.slot-7-8-9 .slot-7-8-9,.slot-8 .slot-8,.slot-8-9 .slot-8,.slot-8-9 .slot-8-9{ margin-left:0 !important; } /* Important is to avoid repeating this in larger screen css files */
+
+/* Row Clearfix */
+.row:after{ visibility:hidden; display:block; font-size:0; content:" "; clear:both; height:0; }
+.row{ zoom:1; }
@@ -0,0 +1,25 @@
+/* SimpleGrid - a fork of CSSGrid by Crowd Favorite (https://github.com/crowdfavorite/css-grid)
+ * http://simplegrid.info
+ * by Conor Muirhead (http://conor.cc) of Early LLC (http://earlymade.com)
+ * License: http://creativecommons.org/licenses/MIT/ */
+
+/* Containers */
+body { font-size: 100%; }
+.grid{ width:966px; }
+
+/* Slots Setup */
+.slot-0,.slot-1,.slot-2,.slot-3,.slot-4,.slot-5,.slot-0-1,.slot-0-1-2,.slot-0-1-2-3,.slot-0-1-2-3-4,.slot-0-1-2-3-4-5,.slot-1-2,.slot-1-2-3,.slot-1-2-3-4,.slot-1-2-3-4-5,.slot-2-3,.slot-2-3-4,.slot-2-3-4-5,.slot-3-4,.slot-3-4-5,.slot-4-5,.slot-6,.slot-7,.slot-8,.slot-9,.slot-6-7,.slot-6-7-8,.slot-6-7-8-9,.slot-7-8,.slot-7-8-9,.slot-8-9{ display:inline; float:left; margin-left:30px; }
+
+/* 6-Col Grid Sizes */
+.slot-0,.slot-1,.slot-2,.slot-3,.slot-4,.slot-5{ width:136px; } /* Sixths */
+.slot-0-1,.slot-1-2,.slot-2-3,.slot-3-4,.slot-4-5{ width:302px; } /* Thirds */
+.slot-0-1-2-3,.slot-1-2-3-4,.slot-2-3-4-5{ width:634px; } /* Two-Thirds */
+.slot-0-1-2-3-4,.slot-1-2-3-4-5{ width:800px; } /* Five-Sixths */
+
+/* 4-Col Grid Sizes */
+.slot-6,.slot-7,.slot-8,.slot-9{ width:219px; } /* Quarters */
+.slot-6-7-8,.slot-7-8-9{ width:717px; } /* Three-Quarters */
+
+/* 6-Col/4-Col Shared Grid Sizes */
+.slot-0-1-2,.slot-1-2-3,.slot-2-3-4,.slot-3-4-5, .slot-6-7,.slot-7-8,.slot-8-9{ width:468px; } /* Halves */
+
Oops, something went wrong.

0 comments on commit e67a55a

Please sign in to comment.