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/perl | |
# simple script to run a query on all the CouchDB saved views under the "projections" design | |
# document, in order to force CouchDB to re-index them. | |
# | |
# Usage: | |
# | |
# update_couchdb_views.pl couchdb_host couchdb_database | |
# | |
# e.g. | |
# update_couchdb_views.pl http://localhost:5984 honbot |
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/sh/env python | |
# | |
# Simple script for comparing the various ways of "boosting" queries in Solr, | |
# combined with the three main query parsers (lucene, dismax, and edismax). | |
# The idea is to generate md5sums of the search results, so I can quickly | |
# figure out which boost methods work the same as the other ones. | |
# | |
import re, urllib2, urllib, md5, json |
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
/** | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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 org.healthonnet.solr; | |
import java.io.IOException; | |
import java.io.StringReader; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import org.apache.lucene.analysis.Analyzer; | |
import org.apache.lucene.analysis.Token; | |
import org.apache.lucene.analysis.TokenStream; |
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/sh/env python | |
# organize the strings.xml files used for Android projects | |
# assumes I have some strings in the English one that don't need to be translated, so these | |
# are separated from the rest. Also assumes I always keep up with the French translations. | |
# | |
# usage: just run it from the res/ folder | |
# | |
import sys, re, os | |
from xml.dom.minidom import parseString |
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/sh/env python | |
# | |
# Quick script to generate eye-pleasing colors based on a single Saturation and Value (Brightness). | |
# Print out in HTML hex format | |
# | |
# usage: generate_random_colors.py numColors saturation value multiMode htmlMode | |
# | |
import sys, colorsys, random |
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
import java.util.regex.Pattern; | |
// note that you won't need to escape the $ in Java | |
Pattern filterBadSpellcheckPattern = Pattern.compile("[:.,;!?\\)\\('\"\\-\u2026\u00AE\u00A9]\$") |
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
/**! | |
* | |
* Utility class for detecting whether or not we're in PhoneGap vs. the browser | |
* @author nolan | |
**/ | |
/** set to true if you want to pretend we're PhoneGap in the browser **/ | |
var FORCE_CORDOVA = false; | |
var CordovaVsBrowser = { |
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 python | |
# fix an Android APK built by PhoneGap Build to correct the problem of | |
# xhdpi images not being correctly added (https://github.com/phonegap/build/issues/9) | |
# | |
# REQUIRES apktool and jarsigner to already be installed and on the PATH. | |
# | |
# usage: fix_android_apk.py www/config.xml InputFile.apk OutputFile.apk | |
# | |
import os,sys,shutil,tempfile,xml.dom.minidom |
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 | |
# | |
# Minify every JS and CSS file in the given directories, except for anything with "min" in the name. | |
# Creates new files with the names *.min.js and *.min.css. Deletes the originals. Modified all the html files | |
# to say ".min.js" and ".min.css" instead of ".js" and ".css". | |
# Also has an optional debug mode that removes strict mode without minifying. | |
# | |
# usage: minify_everything.sh my/yuicompressor.jar my/js/folder my/css/folder debug_mode[0,1] [htmlFiles ...] | |
# |
OlderNewer