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
. "$TM_SUPPORT_PATH/lib/webpreview.sh" | |
require_cmd "${TM_ANT:=ant}" "Ant was not found, please ensure that it has been installed and your \$PATH is set correctly." | |
html_header "Ant Build" | |
cd "$TM_SELECTED_FILE"; | |
result=`"$TM_ANT"`; | |
echo "<pre>$result</pre>"; | |
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
makeSearchCommand({ | |
name: "tsearch", | |
url: "http://search.twitter.com/search?q={QUERY}", | |
icon: "http://twitter.com/favicon.ico", | |
description: "Searches Twitter for your words.", | |
preview: function(pblock, directObject) { | |
var searchTerm = directObject.text; | |
var pTemplate = "Searches Twitter for <b>${query}</b>"; | |
var pData = {query: searchTerm}; | |
pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData); |
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
CmdUtils.CreateCommand({ | |
name: "bitly", | |
takes: {"url to shorten": noun_arb_text}, | |
preview: "Replaces the selected URL with a bit.ly-shortened URL.", | |
description: "Replaces the selected URL with a bit.ly-shortened URL.", | |
icon: "http://bit.ly/favicon.png", | |
homepage: "http://static.al3x.net/ubiquity.html", | |
author: { name: "Alex Payne", email: "al3x@al3x.net"}, | |
license: "WTFPL", | |
execute: function( urlToShorten ) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>ruby.gem.server</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/gem</string> | |
<string>server</string> |
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
trait WhoAreYou { | |
def whatClassAmI: Class[_] = this.getClass | |
println("I've been mixed into " + whatClassAmI) | |
if (whatClassAmI == classOf[Bar]) { | |
println("Holy cow batman, I'm part of a Bar") | |
} | |
} | |
class Foo extends WhoAreYou |
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.logging.Logger | |
import javax.servlet.http.{HttpServletRequest, HttpServletResponse} | |
import org.mortbay.jetty.Server | |
import org.mortbay.jetty.handler.AbstractHandler | |
object Test extends AbstractHandler { | |
val log = Logger.getLogger("handler") | |
def main(args : Array[String]) = { |
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
Dear Red States, | |
We've decided we're leaving. We intend to form our own country, and we're taking the other Blue | |
States with us. In case you aren't aware, that includes Hawaii, California, Oregon, Washington, | |
Minnesota, Wisconsin, Michigan, Illinois, New York, and all of the Northeastern states. After this | |
election, we'll be adding Colorado and New Mexico. We believe this split will be beneficial to the | |
nation, especially to the people of our new country - Nuevo California. | |
To sum up briefly: You get Texas, Oklahoma and all the slave states; we get stem cell research, the | |
best beaches, and the best ski resorts. We get Elliot Spitzer; you get Ken Lay. We get the Statue of |
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 | |
# -*- coding: UTF-8 -*- | |
''' | |
URL: http://projecteuler.net/index.php?section=problems&id=52 | |
Problem summary goes here: | |
It can be seen that the number, 125874, and its double, 251748, contain | |
exactly the same digits, but in a different order. | |
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
startup_message off | |
defscrollback 5000 | |
autodetach on | |
hardstatus alwayslastline "%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]" |
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/php -q | |
<?php | |
// modified from http://3v1n0.tuxfamily.org/scripts/detextile/HTML-to-Textile.php | |
class html2textile { | |
function detextile($text) { | |
$text = preg_replace("/(<\/?)(\w+)([^>]*>)/e", "'\\1'.strtolower('\\2').'\\3'", $text); | |
$text = preg_replace("/<br[ \/]*>\s*/","\n",$text); | |
$text = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $text); | |
$text = stripslashes($text); | |
$oktags = array('p','ol','ul','li','i','b','em','strong','span','a','h[1-6]', |
OlderNewer