Create windows 10 boot disk on almost any linux host

Mount the ISO:

sudo mount -t udf -o loop,ro,unhide /path/to/file.iso /mnt

Insert the USB drive.
Run fdisk and specify the device name of the USB drive; for example:

sudo fdisk /dev/sdc

Delete any existing partition table and create a new one.
Create a new partition of at least 4.5 GB. Mark it bootable and set its type to 7 (HPFS/NTFS/ExFAT).
Write changes and exit fdisk.
Create a FAT-32 file system in the new partition; for example:

sudo mkfs.vfat -F 32 /dev/sdc1

Mount this partition to an existing subdirectory; for example:

sudo mount /dev/sdc1 /media/usbstick

Copy all of the files from the mounted ISO into this directory:

sudo cp -rv /mnt/* /media/usbstick

Sync the file systems just to be sure:

sudo sync

Unmount both items previously mounted:

sudo umount /media/usbstick
sudo umount /mnt

nJoy 😉

 

.Net Restart an ASP.NET application programmatically without editing the web.config

Windows oddly.. but a good friend found this it’s on her site:

http://rochcass.wordpress.com/2013/03/28/restart-an-asp-net-application-programmatically-without-editing-the-web-config/

to quote:

Several times I would be working on a site and some data would not change due to session variables or the .NET cache. This can’t be eliminated by clearing the browser cache but would need the whole ASP.NET application to be restarted to clear all sessions and cache. A traditional way of doing so is to edit the web.config slightly (a space, comma, fullstop would do the trick) … however this was happening often so I decided to restart my application automatically through my code. To do so, I used the Global.ascx on application_start and added this simple line of code which restarts the ADO.NET application:

System.Web.HttpRuntime.UnloadAppDomain();

 

Thanks Roch..

nJoy;-)

 

Windows command line power control

While this is a Linux forum this came in REALLY handy so what the heck 🙂

Frustratingly hidden away, windows command for putting the machine into Hibernate and / or standby are hidden away in the api under the powrprof.dll library.

 

Shutdown %windir%\System32\shutdown.exe -s

Reboot %windir%\System32\shutdown.exe -r

Logoff %windir%\System32\shutdown.exe -l

Standby %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby

Hibernate %windir%\System32\shutdown.exe -h     OR

%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate

 

Also if you Windows 7 wakes up and you don’t know why check:

powercfg lastwake

Hope this helps.