This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('sys'), | |
http = require('http'); | |
var listen_port = 8000; | |
http.createServer(function (request, response) { | |
//sys.log(request.connection.remoteAddress + ": " + request.method + " " + request.url); | |
var proxy = http.createClient(80, request.headers['host']) | |
var proxy_request = proxy.request(request.method, request.url, request.headers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copied from a blog... but I have lost the link to it | |
HOST=localhost | |
PORT=25 | |
python -m smtpd -n -c DebuggingServer ${HOST}:${PORT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
# starts the built in Python web server... | |
# http://effbot.org/librarybook/simplehttpserver.htm | |
python -m SimpleHTTPServer 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set up: | |
export EDITOR=emacsclient | |
In a running emacs: | |
M-x server-start | |
To quit editing and return control the gnuclient: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package recfun | |
object session { | |
// Balances parens... | |
// | |
def balance(chars: List[Char]): Boolean = { | |
import scala.annotation.tailrec | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emacs -nw -l site.el -f site-publish -kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; | |
;;; | |
;;; | |
(defun string/ends-with (s ending) | |
"return non-nil if string S ends with ENDING." | |
(cond ((>= (length s) (length ending)) | |
(let ((elength (length ending))) | |
(string= (substring s (- 0 elength)) ending))) | |
(t nil))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; To run: | |
;; * eval the buffer | |
;; * M-x site-publish | |
;; | |
(require 'org-publish) | |
(require 'org-agenda) | |
;;; Org-mode export settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect('weblogic', '<password>', 't3://<server>:<port>') | |
# Lists the failed itmes in an IPM workflow queue | |
listIPMWorkflowFaults() | |
# Examples of hwo to run this script follow.... | |
#repairIPMWorkflowFaults(startDate="2009-06-01", endDate="2009-06-02") | |
repairIPMWorkflowFaults(appId=30) | |
#repairIPMWorkflowFaults(batchId=15) | |
#repairIPMWorkflowFaults(startDate="2009-06-01", endDate="2009-06-02", appid=3) | |
sumIPMWorkflowFaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect('weblogic', '<password>', 't3://<server>:<port>') | |
listIPMWorkflowFaults() | |
# Note: you can pass params to this in order to selectively clear the errors | |
# Please consult the documentation to see what options are available! | |
# You have been warned. | |
clearIPMWorkflowFaults() |
OlderNewer