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.io.File; | |
import java.util.Properties; | |
import java.util.Set; | |
import java.util.HashSet; | |
import org.python.core.PyException; | |
import org.python.core.PySystemState; | |
import org.python.core.imp; | |
import org.python.modules._py_compile; |
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
CLASSPATH=/usr/local/jython2.5.0/jython.jar:. java compile $1 |
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 javax.script.*; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) throws FileNotFoundException, ScriptException { | |
// Setup various objects | |
ScriptEngineManager engineManager = new ScriptEngineManager(); |
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
on growlNotification(titleArg, descriptionArg) | |
tell application "GrowlHelperApp" | |
set allList to {"Notification"} | |
set enabledList to {"Notification"} | |
register as application "Scripting" all notifications allList default notifications enabledList icon of application "Script Editor" | |
notify with name "Notification" title titleArg description descriptionArg application name "Scripting" | |
return "Hello From AppleScript!" | |
end tell | |
end growlNotification |
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
#!/opt/personal/pkg/perl5.10/bin/perl | |
# A script to combine some files or files in a directory together in a path | |
use Modern::Perl; | |
use Cwd 'abs_path'; | |
use File::Find; | |
use Getopt::Long; | |
sub main { | |
my $regex; | |
GetOptions('regex=s' => \$regex); |
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
#!/usr/bin/env perl | |
use Modern::Perl; | |
use MooseX::Declare; | |
use TryCatch; | |
use 5.12.0; | |
class BankAccount { | |
has 'balance' => ( isa => 'Num', is => 'rw', default => 0 ); | |
method deposit(Num $amount) { |
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
#!/usr/bin/env perl | |
use 5.12.0; | |
use warnings; | |
use Math::Random; | |
use Data::Dumper; | |
=pod | |
A little perl script for determining the draft order for a fantasy football (or any sport) | |
league. |
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
package MyApp; | |
use Moose; | |
use namespace::autoclean; | |
use Catalyst::Runtime 5.80; | |
# Set flags and add plugins for the application | |
# | |
# -Debug: activates the debug mode for very useful log messages | |
# ConfigLoader: will load the configuration from a Config::General file in the |
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
{- One solution to fizzbuzz. I think it's correct | |
- Took longer than 10 minutes but I'm still pretty | |
- new to haskell . | |
-} | |
fizzbuzz n | |
| mod3 n && mod5 n = "FizzBuzz" | |
| mod3 n = "Fizz" | |
| mod5 n = "Buzz" | |
| otherwise = show n | |
where mod5 x = x `mod` 5 == 0 |
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
" Setup Pathogen | |
filetype off | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() |
OlderNewer