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
import os, glob | |
import string | |
from gimpfu import * | |
mime_type = 'png'; | |
path = '/home/avirams/Dropbox/articles/WebSphere Scheduler/images' | |
# here we do a foreach loop |
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
Context ctx = new InitialContext(); | |
PortletServiceHome pumaService = (PortletServiceHome)ctx.lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome"); | |
PumaHome pumaHome = (PumaHome)pumaService.getPortletService(PumaHome.class); | |
PrivilegedExceptionAction<Void> action = new PrivilegedExceptionAction<Void>() { | |
@Override | |
public Void run() { | |
// do stuff unrestricted | |
return null; | |
} |
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
udisks --unmount /dev/sdb1 && udisks --detach /dev/sdb |
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
#Encode | |
${WAS_HOME}/java/bin/java -Djava.ext.dirs=${WAS_HOME}/plugins:${WAS_HOME}/lib com.ibm.ws.security.util.PasswordEncoder xxxxxxxx | |
#Decode | |
${WAS_HOME}/java/bin/java -Djava.ext.dirs=${WAS_HOME}/plugins:${WAS_HOME}/lib com.ibm.ws.security.util.PasswordDecoder {xor}JycnJycnJyc= |
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 static SingleSignonToken getSSOTokenFromSubject(final Subject subject) { | |
if (subject == null) { | |
return null; | |
} | |
return AccessController.doPrivileged(new PrivilegedAction<SingleSignonToken>() { | |
public SingleSignonToken run() { | |
Set<SingleSignonToken> ssoTokens = subject.getPrivateCredentials(SingleSignonToken.class); | |
for (SingleSignonToken ssoToken : ssoTokens) { | |
if (ssoToken.getName().equals("LtpaToken")) { | |
return ssoToken; |
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
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]┌─[\[\033[01;34m\]\u@\h\[\033[00m\]]──[\[\033[01;34m\]\w\[\033[00m\]]──\n└─\$ " |
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
/** | |
* Run code with the server subject | |
* (having the authorization to do any administration operation) | |
*/ | |
PrivilegedExceptionAction<Void> action = new PrivilegedExceptionAction<Void>() { | |
@Override | |
public Void run() { | |
// YOUR CODE HERE | |
return null; |
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
/** | |
* The following snippets shows how to set a custom endpoint for a JAX-WS generated WebClient on runtime | |
*/ | |
// Get the service and the port | |
SampleService service = new SampleService(); | |
Sample port = service.getESamplePort(); | |
// Use the BindingProvider's context to set the endpoint | |
BindingProvider bp = (BindingProvider)port; |
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
/** | |
* CommandMgr can be used to invoke any wsadmin's AdminTask commands | |
* For list of command and their parameter, use ConfigMgr.getCommandsMetadata and/or look | |
* at the AdminTask documentation in the WAS infocenter | |
* | |
* This code must run inside a server's JVM | |
*/ | |
CommandMgr cmdMgr = null; | |
ConfigService cfgService = null; |
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
yum install gtk2.i686 gtk2-engines.i686 PackageKit-gtk-module.i686 PackageKit-gtk-module.x86_64 libcanberra-gtk2.x86_64 libcanberra-gtk2.i686 |