This file contains hidden or 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
// JavaDoc Search Bookmarklet by Josh Goebel | |
// Original source at Pastie.net: http://pastie.org/434851 | |
// | |
// Select the text below, then drag it to your browser's toolbar. This creates a | |
// bookmark to perform Java 6 searches. After you create the bookmark, you probably | |
// want to edit the description. On FireFox, just right click the bookmark, select | |
// Properties, and change the name. | |
javascript:void(q=prompt('Java%20class%20Name:',''));if(q)void(location.href='http://www.google.com/search?q='+escape(q)+'%20site%3Ajava.sun.com%2Fjavase%2F6%2Fdocs') |
This file contains hidden or 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
same as http://pastie.org/434851 but with "I'm Feeling Lucky" so you skip the search results list. | |
javascript:void(q=prompt('Java%20class%20Name:',''));if(q)void(location.href='http://www.google.com/search?q='+escape(q)+'%20site%3Ajava.sun.com%2Fjavase%2F6%2Fdocs'+'&btnI=745') |
This file contains hidden or 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
<mirrors> | |
<mirror> | |
<!--This is used to direct the public snapshots repo in the profile below over to a different nexus group --> | |
<id>nexus-public-snapshots</id> | |
<mirrorOf>public-snapshots</mirrorOf> | |
<url>http://localhost:8081/nexus/content/groups/public-snapshots</url> | |
</mirror> | |
<mirror> | |
<!--This sends everything else to /public --> | |
<id>nexus-public-releases</id> |
This file contains hidden or 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.Map; | |
import static com.sun.btrace.BTraceUtils.*; | |
import com.sun.btrace.annotations.*; | |
@BTrace | |
public class ManyMethodTimerTemplate { | |
@TLS private static Map<String, Long> startTimes = newHashMap(); | |
<% targetClasses.eachWithIndex { className, classData, classIndex -> %> | |
<% classData.targetMethods.eachWithIndex { targetMethod, methodIndex -> %> |
This file contains hidden or 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
btrace { | |
templates { | |
// all methods within mydomain classes | |
methodTimerTemplate { | |
template = 'btrace-templates\\ManyMethodTimerTemplate.template' | |
targetClasses { | |
'/com\\\\.mydomain\\\\..+/' { | |
targetMethods = [ '/.+/' ] | |
} | |
} |
This file contains hidden or 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 | |
# | |
# Provides a function that allows you to choose a JDK. Just set the environment | |
# variable JDKS_ROOT to the directory containing multiple versions of the JDK | |
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned | |
# up and set appropriately. | |
# Usage: | |
# Include in .profile or .bashrc or source at login to get 'pickjdk' command. | |
# 'pickjdk' alone to bring up a menu of installed JDKs on OS X. Select one. |
This file contains hidden or 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
; Define the project and store in a variable | |
(def project (defproject "a:b:c" | |
:dependencies ["org.clojure:clojure:1.1.0-alpha-SNAPSHOT" | |
"org.clojure:clojure-contrib:1.0-SNAPSHOT"])) | |
; Use the provided API to easily add a new dependency programatically | |
(add-dependency! project "org.testng:testng:5.10") | |
; Return the project | |
project |
This file contains hidden or 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
----------------------------------------------------------------------- | |
-- A Script that opens a specified command line folder name in a new | |
-- terminal tab. | |
-- | |
-- Composed by Matthew McCullough, 2010 | |
-- MIT License. Share freely. | |
----------------------------------------------------------------------- | |
--Reference for tab opening | |
-- http://lambie.org/2007/11/03/tabs-in-terminal-using-applescript-on-leopard/ | |
--Reference for other scripting approaches with Terminal |
This file contains hidden or 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
tell application "Finder" | |
activate | |
set these_items to the selection | |
log these_items | |
repeat with this_item in these_items | |
set item_name to (get displayed name of this_item) | |
if item_name is not ".DS_Store" then | |
set current_com to (get comment of this_item) | |
if current_com is not "" then | |
set comment of this_item to current_com as string |
This file contains hidden or 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
--Source: http://www.macosxhints.com/dlfiles/spotlight_comment_script.txt | |
-- you can change the text within quotes to suit your purposes.... | |
property flag : "MySpotlightComment" | |
property delim : " - " | |
on adding folder items to this_folder after receiving these_items | |
tell application "Finder" | |
set folder_name to name of this_folder | |
repeat with this_item in these_items | |
set item_name to (get displayed name of this_item) |