Eftersom jag ständigt glömmer bort koden, härna:
boolean editMode;
@Override
public void preRender(OrchidContext oc) throws OrchidException {
editMode = (getContentSession().getMode() == ContentSession.EDIT_MODE);
}
Eftersom jag ständigt glömmer bort koden, härna:
boolean editMode;
@Override
public void preRender(OrchidContext oc) throws OrchidException {
editMode = (getContentSession().getMode() == ContentSession.EDIT_MODE);
}
I use my mac mini to backup my windows box using the (free) software from crashplan.
The mac mini sits at the top of a book shelf and so is hard to reach so to wake it up and put it to sleep, I use putty with a stored config that executes:
pmset sleepnow
I use puttygen to get a public/private key and put the public one into .ssh/authorized_keys on the mac and then put:
putty.exe -load MiniSleep
into a batch file (MiniSleep is the stored config).
To wake it up, I use mc-wol.exe and use the ethernet-mac address on the mac as argument. That is also put into a batch file.
So, now I have two batch files, wakeup.bat and sleep.bat
Links:
Enjoy
Tema: Silver is the New Black. Blogga med WordPress.com.