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
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
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
var PASSED = 'passed', | |
STARTED = 'started', | |
FAILED = 'failed', | |
ERRORED = 'errored', | |
CANCELED = 'canceled', | |
POLL_PERIOD = 5000, | |
MAX_MINUTES = 22; | |
function icon(which) { |
Here I'm trying to understand what happens when I run
./hello
#include
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
try { | |
Class util = Class.forName("com.apple.eawt.Application"); | |
Method getApplication = util.getMethod("getApplication", new Class[0]); | |
Object application = getApplication.invoke(util); | |
Class params[] = new Class[1]; | |
params[0] = Image.class; | |
Method setDockIconImage = util.getMethod("setDockIconImage", params); | |
URL url = App.class.getClassLoader().getResource("icon.png"); | |
Image image = Toolkit.getDefaultToolkit().getImage(url); | |
setDockIconImage.invoke(application, image); |