Skip to content

Instantly share code, notes, and snippets.

# Install log!!!
sudo apt-get update
## Dropbox
# Install dropbox from dropbox.com
## iPhone tethering (Maverick 10.10)
sudo add-apt-repository ppa:pmcenery/ppa && sudo apt-get update
sudo apt-get install -y gvfs ipheth-utils

Proposed direction for Monk 1.0

Goals

  • Position Monk as a 'fat-free Rails alternative' for people hoping to create applications fast
  • Acquire more users and get them acquainted with simpler, less-abstract way of doing web apps

Approach

# Sinatra helper for jQuery.
# Usage:
# Instead of doing <script src="/js/jquery.js">, use:
#
# <%= jquery %>
#
class Main
helpers do
def jquery(path='/js/jquery.js', version='1.4.3')
# Usage:
browser.ie6?
browser.gecko?
browser.chrome? and browser.linux?
# In the wild:
<% if browser.ios? %>
<script src="/js/iphone.js"></script>
check process redis
with pidfile /home/leafpile/app/db/redis/production/redis.pid
start program = "/opt/redis/bin/redis-server /home/leafpile/app/config/redis/production.conf"
as uid leafpile and gid leafpile
stop program = "/opt/redis/bin/redis-cli -p 22222 shutdown"
as uid leafpile and gid leafpile
if failed host 127.0.0.1 port 22222 then restart
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file, a complete list of statements and
## options please have a look in the monit manual.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [173:19966]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT
-A INPUT -p tcp --dport 22222 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -j DROP
#!/bin/bash
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
#
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [173:19966]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -j DROP
COMMIT
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.