Skip to content

Instantly share code, notes, and snippets.

public class NoteFinderLuceneImplTest implements Lookup.Provider {
private static NoteFinderLuceneImpl instance;
private Lookup lookup;
private InstanceContent ic = new InstanceContent (); // see http://bit.ly/aL7q9M for more details
public NoteFinderLuceneImplTest() {
}
@BeforeClass
#include <math.h>
#include <float.h>
#include <limits.h>
int valx = 0;
int valy = 0;
int valz = 0;
int xaxis = 0;
#!/usr/bin/env ruby
# Input: WordPress XML export file.
# Outputs: a series of Textile files ready to be included in a Jekyll site,
# and comments.yml which contains all approved comments with metadata which
# can be used for a Disqus import.
# Changes from the original gist: http://gist.github.com/268428
# 1. Handles titles containing special characters. Those have to be YAML escaped
# 2. Use the original permalinks in wordpress.
/*
* Menu: Get Eclipse Icons > Make web page
* Script-Path: /EclipseIcons/monkey/make_web_page.gm
* Kudos: ecerulm
* License: EPL 1.0
*/
def findFilesinFolder(folder) {
def toReturn = new ArrayList();
#!/usr/bin/perl -w
# this small program starts a http daeomon listening on port 1111 and provides a RSS feed
# to all .mp4 files stored in the 'videos' folder.
# This program is intended to transfer movie files via wireless. Using the sony psp RSS feed utility
# 1. Start the server with ./rssstandaloneserver.pl
# 2. Copy some video files on videos subfolder
# 3. Point you PSP browser to the http://<address>:<port>/ and the psp browser will display a page to
# subscribe to the feed.
# 4. Go to Psp->Network->RSS Channel and select the new feed
echo copying local history file
history -a
cp .bash_history full_history
HOSTS="machine1.example.com machine2.example.com"
for i in $HOSTS; do
echo copying history file from $i
scp $i:~/.bash_history tmp_history.txt
cat tmp_history.txt >>full_history
wc -l tmp_history.txt
import java.io.FileInputStream;
import java.security.Key;
import java.security.KeyStore;
import sun.misc.BASE64Encoder;
/**
* This is an utility program that reads the keystore file specified in the
* parameter and dumps to the standard output the private key encoded in Base64
*
#
# script to merge two tikiwiki s
#
require "rubygems"
require "mysql"
require "log4r"
require "iconv"
include Log4r
def createInsert(dbh, table, row )
#!/bin/bash
ext=$1
if [ ! $ext ]; then
ext="avi"
fi
FILES=`find . -iname "*.$ext" -printf "%p\n"`
IFS="
"
for i in $FILES; do
// to generate the following JSON output
// {"identifier":"abbreviation",
// "items":[ {"name":"Alaska","label":"Alaska","abbreviation":"AK"},
// {"name":"Wyoming","label":"Wyoming","abbreviation":"WY"}
// ]}
package com.rubenlaguna.json.flexjson;
import flexjson.JSONSerializer;