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
private static final Point size = new Point(16, 16); | |
private Image getDecoratedImage(ImageRegistry registry, | |
String baseImageId, | |
IStatus status){ | |
ImageDescriptor overlay = null; | |
Image baseImage = registry.get(baseImageId); | |
switch (status.getSeverity()) { | |
case IStatus.ERROR: | |
overlay = PlatformUI.getWorkbench().getSharedImages() |
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 void openWizard(String id) { | |
// First see if this is a "new wizard". | |
IWizardDescriptor descriptor = PlatformUI.getWorkbench() | |
.getNewWizardRegistry().findWizard(id); | |
// If not check if it is an "import wizard". | |
if (descriptor == null) { | |
descriptor = PlatformUI.getWorkbench().getImportWizardRegistry() | |
.findWizard(id); | |
} | |
// Or maybe an export wizard |
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 | |
#----------------------------------------------------------------------------- | |
# pixma2pdf.sh version 2.0 | |
# | |
# Copyright (c) 2009 Torkild U. Resheim - [email protected] | |
# Released under the Eclipse Public License version 1.0 | |
#----------------------------------------------------------------------------- | |
title="Canon Pixma - Scan to PDF" | |
dialog --title "$title" --checklist "Scan options" 10 50 10 \ |
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 Data { | |
boolean busy; | |
String firstName; | |
String lastName; | |
public Data(String firstName, String lastName, boolean busy) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
this.busy = busy; | |
} |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
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
/******************************************************************************* | |
* Copyright (c) 2011,2012 Torkild U. Resheim. | |
* | |
* All rights reserved. This program and the accompanying materials are made | |
* available under the terms of the Eclipse Public License v1.0 which | |
* accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: Torkild U. Resheim - initial API and implementation | |
*******************************************************************************/ |
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 | |
''' | |
Register a mDNS/DNS-SD alias name for your computer using the Avahi daemon | |
This script will register an alternate CNAME alias besides your hostname, | |
which could be useful for ex. when serving several http virtual hosts to | |
your ffriends on the local network and you don't want to make them configure | |
their /etc/hosts. | |
Why a CNAME? You could also publish your current address with avahi-publish-address |
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/sh | |
for issue in {50..5000} | |
do | |
echo "Closing issue #$issue" | |
curl --progress-bar --user "<github-user>:<github-password>" -X PATCH \ | |
--data '{"state":"closed","title":"Inadvertently created by Zapier sync","body":""}' \ | |
https://api.github.com/repos/<github-user>/<github-repo>/issues/$issue > /dev/null | |
done |
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 | |
# | |
# Startup script for Derby | |
# | |
# chkconfig: 345 94 16 | |
# description: Derby startup script | |
# to enable on bootup on redhat "chkconfig --level 35 derby on" | |
# to enable on bootup on debian "update-rc.d derby defaults" or the | |
# slightly longer (but better run levels) "update-rc.d derby start 91 2 3 4 5 . stop 20 0 1 6 ." |
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 | |
#----------------------------------------------------------------------------- | |
# pixma2pdf.sh version 3.0 | |
# | |
# Copyright (c) 2009, 2013 Torkild U. Resheim - [email protected] | |
# Released under the Eclipse Public License version 1.0 | |
#----------------------------------------------------------------------------- | |
t=$(tempfile) || exit | |
trap "rm -f -- '$t'" EXIT |
OlderNewer