find myDirectory/ -name "*.jar" | xargs grep HelloWorld.class
Thursday, February 1, 2018
Locate Class File in JAR
This is a really easy way on Linux to find a class file in a set of JAR files:
Sunday, April 24, 2016
Learning to say No!
The questions I kept asking myself was 'How did I get to this point?', 'Why do I have so much on my plate?' and 'Why do I never have any time to catch up on my admin?'
Well the truth of the matter is that I say Yes way to quickly. It's not easy saying No when you want to please people. But what I forget is that when I say Yes to something I actually saying No to something else.
Chatting to one of my friends a couple of weeks ago he said I was 'oversubscribed' and I knew straight away I was in trouble, because it was the truth. Getting your way out of a situation like this is a lot more difficult than I would have initial thought. It required me to change my thinking.
Yes I want to offer a good service to my 'customers', yes I want to conduct myself in a professional way and yes I like it when I contribute to a positive outcome. The trouble is you can very quickly come to a point where you become completely ineffective. And this is key. I was being very efficient in what I was doing, but if I externalised it and looked from the outside for a moment I would see that people viewed me as very ineffective because I had become 'oversubscribed'.
So! What I have I had to change? I've learnt to say No! At first this was a bit tricky as you don't want to let people down etc. etc. BUT it's a critical skill to have when managing relationships, customers and life in general. I guess a lot of it also comes down to having firm boundaries. Here some tips that helped me get to this point:
Chatting to one of my friends a couple of weeks ago he said I was 'oversubscribed' and I knew straight away I was in trouble, because it was the truth. Getting your way out of a situation like this is a lot more difficult than I would have initial thought. It required me to change my thinking.
Yes I want to offer a good service to my 'customers', yes I want to conduct myself in a professional way and yes I like it when I contribute to a positive outcome. The trouble is you can very quickly come to a point where you become completely ineffective. And this is key. I was being very efficient in what I was doing, but if I externalised it and looked from the outside for a moment I would see that people viewed me as very ineffective because I had become 'oversubscribed'.
So! What I have I had to change? I've learnt to say No! At first this was a bit tricky as you don't want to let people down etc. etc. BUT it's a critical skill to have when managing relationships, customers and life in general. I guess a lot of it also comes down to having firm boundaries. Here some tips that helped me get to this point:
- When you say no to something you say yes to something else, and vice vesa
- When you say yes to everything people come to expect you to always say yes, so when they need 'work' done they'll always come straight to you cause they know you'll say yes
- People don't respect people that say yes to everything
- Sometimes you don't need to say no, you just need to say not now, or the timing of this is not for you. A lot of saying no comes down to how you say no. That's were I found this article that came in handy -> The Gentle Art of Saying No What this did not cover for me was why I should be saying no. And this is critical, if you don't know why you're saying no, you land up going back to saying yes.
I guess that's enough about yes and no for now, but I've had to learn this the hard way, and I guess in life sometimes that's the only way we do learn certain things.
Quote for the day here:
"Success is a lousy teacher. It seduces smart people into thinking they can't lose." Bill Gates
Sunday, May 17, 2015
David Pogue: Simplicity sells
Still one of my all time favourites
Tuesday, April 21, 2015
Wednesday, January 28, 2015
X11 Forwarding - request failed on channel 0
A quick note on getting X11 forwarding working ->
Error: X11 forwarding request failed on channel 0
Platofrm: SLES 11 SP3
Resolution: install xorg-x11-xauth
Other interesting things to try which could also cause this issue: http://ask.xmodulo.com/fix-broken-x11-forwarding-ssh.html
Error: X11 forwarding request failed on channel 0
Platofrm: SLES 11 SP3
Resolution: install xorg-x11-xauth
Other interesting things to try which could also cause this issue: http://ask.xmodulo.com/fix-broken-x11-forwarding-ssh.html
Saturday, January 24, 2015
How to Avoid Death by PowerPoint
Interesting video on this:
How to avoid death By PowerPoint: David JP Phillips at TEDxStockholm
Main points from this are:
How to avoid death By PowerPoint: David JP Phillips at TEDxStockholm
Main points from this are:
- One message per slide
- Use contrast and size to steer focus
- Avoid sentences if speaking at the same time
- Use a dark background
- Six objects per slide
Another one more on the lighter side that I enjoyed by Don McMillan:
Monday, January 19, 2015
NetIQ IDM 4.0.2 Install - iManager Error
Considering I keep forgetting to do this in my lab environments I thought I post a quick note on it.
Environment:
SLES 11 64 bit SP3
IDM 4.0.2
Error:
Unable to create AdminNamespace.
java.lang.NoClassDefFoundError: Could not initialize class
com.novell.admin.ns.nds.jclient.NDSNamespaceImpl
From tomcat log file:
java.lang.UnsatisfiedLinkError:
/var/opt/novell/iManager/nps/WEB-INF/bin/linux/libJClient.so.1.0.0:
libstdc++.so.5: cannot open shared objec
t file: No such file or directory
NDSNamespaceImpl....235 java.lang.Exception: Unable to
initialize JClient: java.lang.UnsatisfiedLinkError:
/var/opt/novell/iManager/nps/WEB-
INF/bin/linux/libJClient.so.1.0.0: libstdc++.so.5: cannot
open shared object file: No such file or directory
Fix:
Install libstdc++33-32bit
Command: yast –i libstdc++33-32bit
Reference:
https://www.netiq.com/documentation/imanager/imanager_install/data/bobxl9n.html
Quote on development tools
"One piece of advice I would pass on to new developers is to remember it is your job to make life easier/better for the USER, not for yourself. Pick the platform, language, and framework that lets you get the' job done for the end user as fast, cheaply, and as maintainable as possible. If that means YOU have to do a lot more work, well, so be it. Never ever use a language simply because it is "cool". Languages are tools, you pick a tool because it works, not because it makes you feel happy."
Dave Marney
Friday, January 9, 2015
Quote for the day
"Good professional firms have service quality programmes. They do so to genuinely respond
more effectively. They do not do so to merely satisfy some external auditor."
more effectively. They do not do so to merely satisfy some external auditor."
Friday, November 7, 2014
Stop Outlook from launching multiple instances
Basically just edit the shortcut to Outlook and add the /recycle option:
Wednesday, September 17, 2014
Bulk Load LDAP / eDirectory Users
Just a simple BASH script to load users.
#!/bin/bash
FILE_WITH_NAMES="names.txt"
LDAP_SRV="localhost"
LDAP_PORT="389"
ADMIN_DN="cn=admin,ou=sa,o=system"
ADMIN_PASSWD="novell"
USR_BASEDN="ou=users,o=data";
USR_PASSWD="novell";
LDIF="/tmp/bulkuser.ldif"
cat $FILE_WITH_NAMES | while read line
do
#trim trailing white space and clean
fullname=`echo $line | tr -cd '[:print:]\n' | sed -e 's/^ *//' -e 's/ *$//'`
stringarray=($fullname)
fn=${stringarray[0]}
sn=${stringarray[1]}
#replace spaces with .
CN="${fullname/ /.}"
echo "dn: cn=$CN,$USR_BASEDN" > $LDIF
echo "cn: $CN" >> $LDIF
echo "uid: $CN" >> $LDIF
echo "fullName: $fullname" >> $LDIF
echo "sn: $sn" >> $LDIF
echo "givenName: $fn" >> $LDIF
echo "Language: ENGLISH" >> $LDIF
echo "userPassword: $USR_PASSWD" >> $LDIF
echo "objectClass: top" >> $LDIF
echo "objectClass: user" >> $LDIF
ldapmodify -x -h $LDAP_SRV -p $LDAP_PORT -D "$ADMIN_DN" -w $ADMIN_PASSWD -a -f $LDIF
done
Input file (names.txt) should contain a full name on each line e.g.
Boyce Deforge
Allan Giard
Niesha Orozco
Fran Garneau
Valda Wotring
Can use this site to get random names: http://listofrandomnames.com/index.cfm?textarea
Thursday, August 21, 2014
Java Method to Generate OTP
private static String getOTP(int length) {
Random r = new Random();
char[] dArray = "0123456789".toCharArray();
String ret = "" + dArray[ 1 + r.nextInt(8) ];
for(int i=1; i < length; i++) {
ret += dArray[ r.nextInt(9) ];
}
return ret;
}
Monday, August 18, 2014
Technical notes to self
iManager does not like you setting an attribute value to blank. A small LDIF like below will do the trick:
dn: cn=tomjones,ou=users,o=data
change type: modify
add: telephoneNumber
telephoneNumber:
The following will strip blank attributes from an IDM Driver. Normally add to output transform.
<rule>
<description>Strip Empty Values [Add]</description>
<conditions>
<and>
<if-operation mode="case" op="equal">add</if-operation>
</and>
</conditions>
<actions>
<do-strip-xpath expression="add-attr[value='']"/>
<do-strip-xpath expression="add-attr[not(*)]"/>
</actions>
</rule>
<rule>
<description>Strip Empty Values [Modify]</description>
<conditions>
<or>
<if-operation mode="case" op="equal">modify</if-operation>
<if-operation mode="case" op="equal">sync</if-operation>
</or>
</conditions>
<actions>
<do-strip-xpath expression="modify-attr/add-value[value='']"/>
<do-strip-xpath expression="modify-attr[not(*)]"/>
</actions>
</rule>
Communication is Key
The older I get the more I realise how import clear communication is. Communication does not come naturally to all people, espically people in the more technical sectors. I must say I really enjoying working with technology. Things are normally always black and white or zeros and ones. When it comes to people that are a number of soft skills that in my case needed to be learnt and did not come natually and I have to admit I'm still learning new things every day about working with people.
Leason for today:
Talk to people, not about people.
One thing I need to start doing is after key meetings send out my own 'minutes'. This way I communicate my understanding of what was communicated in the meeting and what decisions where made. Also I need to make clear statements in my 'minutes' about assigned roles and responsbilities. Never assume someone has commited to doing something unless it's in black and white!
Friday, August 8, 2014
Database Table Names
Learnt this the hard way when I found out MySQL tables are case sensitive.
Reference: http://stackoverflow.com/questions/14317784/why-underline-is-usually-used-in-the-sql-table-names-rather-than-camel-case
A bit of background information:The (ANSI) SQL standard requires that non-quoted identifiers are stored in all uppercase in the system catalogs and that non-quoted identifiers are case-insensitive.According to the standard the following non-quoted identifiers reference the same object (e.g. a table):FOOBAR,foobar,FooBar(and all would have been stored asFOOBARin the system catalogs).The following quoted identifiers reference 3 different objects:"FOOBAR","foobar","FooBar".Nearly all DBMS comply at least with the requirement that non-quoted identifiers are case insensitive. Except for MySQL and SQL Server as far as I know - both can be configured to be case-sensitive even for non-quoted identifiers. I'm not sure what the default behaviour of SQL Server is though (as Damien pointed out in his comment, this depends on the collation being used for SQL Server).MySQL is even more confusing as its behaviour depends on the combination of several configuration settings, the storage engine and the filesystem. All other DBMS I know are consistent regarding their behaviour across all platforms and installations.PostgreSQL complies with the case-sensitivity but it folds everything to lowercase.So given these rules, I think that the "traditional" naming convention using underscores stems from the fact that object names are stored in uppercase. The only way to get "readable" names is to separate important parts of the name with underscores.SQL Server is even more non-standard as it is case-preserving (similar to the way NTFS under Windows works) so it does not fold the names to anything. So it does not change the case of the name when it's stored in the system catalog (but it is by default case insensitive). For that reason you will find people working in a Microsoft environment using CamelCase more often then e.g. in an Oracle environment.
Reference: http://stackoverflow.com/questions/14317784/why-underline-is-usually-used-in-the-sql-table-names-rather-than-camel-case
Subscribe to:
Posts (Atom)
