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
public class HelloWorld { | |
public static void main(String[] args) { | |
System.out.println("Hello World"); | |
} | |
} |
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
~ $ cat test.sh | |
#!/bin/bash | |
function hello() { | |
echo "ARG1: $1" | |
echo "ARG2: $2" | |
echo "ARG3: $3" | |
} | |
echo "ARG_1: $1" |
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 ruby | |
# -*- coding: utf-8 -*- | |
# -*- ruby -*- | |
require 'optparse' | |
NOW = Time.now | |
CONTENT_TYPE_MAP = { | |
"app" => "com.apple.application-bundle", |
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
_autojump() | |
{ | |
local cur | |
cur=${COMP_WORDS[*]:1} | |
comps=$(autojump --bash --complete $cur) | |
while read i | |
do | |
COMPREPLY=("${COMPREPLY[@]}" "${i}") | |
done <<EOF | |
$comps |
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
#!/opt/local/bin/python2.7 | |
# -*- coding: utf-8 -*- | |
""" | |
Copyright © 2008-2012 Joel Schaerer | |
Copyright © 2012 William Ting | |
* This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 3, or (at your option) | |
any later version. |
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 | |
import sys | |
import getopt | |
import re | |
import types | |
# | |
# Originally written by Einar Lielmanis et al., | |
# Conversion to python by Einar Lielmanis, einar@jsbeautifier.org, |
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 perl | |
my $bounds_string = join "", <>; | |
$bounds_string =~ s#\{#[#g; | |
$bounds_string =~ s#\}#]#g; | |
eval 'our $bounds = ' . $bounds_string; | |
my %apps = (); | |
for my $window (@$bounds) { | |
my $app_name = $window->[0]; | |
my $window_title = $window->[1]; |
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=UTF8 | |
# | |
# texttable - module for creating simple ASCII tables | |
# Copyright (C) 2003-2011 Gerome Fournier <jef(at)foutaise.org> | |
# | |
# This library is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU Lesser General Public | |
# License as published by the Free Software Foundation; either | |
# version 2.1 of the License, or (at your option) any later version. |
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
def parse_options(args=ARGV.dup) | |
unless options | |
raise NoOptionsError, "No command line options defined! Use Pry::CLI.add_options to add command line options." | |
end | |
self.input_args = args | |
opts = Slop.parse!(args, :help => true, :multiple_switches => false, &options) | |
# Option processors are optional. |
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 | |
if [ $# != 3 ] | |
then | |
cat <<EOF | |
Usage: | |
dash-docgen <doc name> <default keyword> <url> | |
EOF | |
else | |
DOC_NAME=$1 |
OlderNewer