Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# sample skeleton for a ruby API based on the ideas from http://www.oceanstore.org/publications/papers/pdf/iptps03-api.pdf | |
class DistributeKeyBasedRouter | |
def initialize(deliver_to_class, deliver_class_method = :delivered) | |
@delivery_callback_class = deliver_to_class | |
@delivery_callback_method = deliver_class_method | |
end | |
#!/usr/bin/env ruby | |
# based on http://gist.github.com/29838 | |
# logging to syslog added | |
# added killing orphaned procs | |
# added culling applications to maintain some per application limits | |
# Find bloating passengers and kill them gracefully. Run from cron every so often. | |
# | |
require "rubygems" | |
require "logging" |
Rails CMS alternatives | |
====================== | |
Note: project activity was checked on 11/26/09. | |
Active projects: | |
--------------- | |
adva-cms | |
repo: http://github.com/svenfuchs/adva_cms/ | |
site: http://adva-cms.org/ | |
Last update: 11/24/09 |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
{-# LANGUAGE Rank2Types | |
, RebindableSyntax | |
, ImplicitParams | |
, NoMonomorphismRestriction #-} | |
import Data.Maybe | |
import Data.Function | |
import Data.String | |
import Prelude (undefined, error, String, (++)) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
module reornament | |
-- Idris translation of Agda code: | |
-- https://gist.github.com/gallais/e507832abc6c91ac7cb9 | |
-- Which follows Conor McBride's Ornaments paper: | |
-- https://personal.cis.strath.ac.uk/conor.mcbride/pub/OAAO/Ornament.pdf | |
ListAlg : Type -> Type -> Type | |
ListAlg A B = (B, A -> B -> B) |