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 pynotify | |
| def notificate(): | |
| n = pynotify.Notification("Hello World", "Simon says HELLO", "notification-message-im") | |
| n.set_urgency(pynotify.URGENCY_NORMAL) | |
| n.set_timeout(200) | |
| if not n.show(): | |
| print "Failed to display notification" | |
| sys.exit(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
| def Evaluate(str): | |
| stack = [] | |
| pushChars, popChars = "<({[", ">)}]" | |
| for c in str : | |
| if c in pushChars : | |
| stack.append(c) | |
| elif c in popChars : | |
| if not len(stack) : | |
| return False | |
| else : |
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 cmd | |
| class CmdProcessor(cmd.Cmd): | |
| """A Simple Command Processor.""" | |
| def do_greeting(self, line): | |
| print "Hello World!" | |
| def do_EOF(self, line): | |
| return True |
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 optparse | |
| def main(): | |
| p = optparse.OptionParser() | |
| p.add_option('--person', '-p', default="world") | |
| options, arguments = p.parse_args() | |
| print 'Hello %s' % options.person | |
| if __name__ == '__main__': | |
| main() |
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 | |
| OS=`uname -s` | |
| if [ "$OS" == "Darwin" ]; then | |
| echo "Mac OS X with Darwin Kernel" | |
| elif [ "$OS" == "Linux" ]; then | |
| echo "GNU/Linux OS with Linux Kernel" | |
| else | |
| echo "Not Mac or Linux" |
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 | |
| function checknet { | |
| UP=$(VBoxManage guestproperty enumerate omero-vm | grep "10.0.2.15") | |
| } | |
| checknet | |
| echo "UP :: " $UP |
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
| /* | |
| * Clear the highlighting to allow the user to toggle | |
| * between the original page & the highlighted page. | |
| */ | |
| function clearHighlighting() | |
| { | |
| alert("clearing hightlighting..."); | |
| if (!document.body || typeof(document.body.innerHTML) == "undefined") { | |
| if (warnOnFailure) { |
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
| ifconfig eth0 | grep 'inet ' | awk '{print $2}' | sed 's/addr://' |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| printf("Hello World\n"); | |
| return 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
| #!/bin/bash | |
| usage() | |
| { | |
| echo "usage: `basename $0` inputfile" | |
| } | |
| IN=$1 | |
| ENDING=".pdf" | |
| OPEN="[[" |
NewerOlder