Tag: windows

  • How to make a bootable usb stick in Windows 7 of a debian iso

    Every so often I need to make a bootable USB stick in Windows 7 (64 bit) of a debian installer iso. For some reason my googling usually does not reveal a simple solution for this.
    I asked on #debian on the OFTC network and got various suggestions. The first suggestions were to use win32 compiled variants of dd or rawwrite. The problem is that there seems to be multiple versions of these tools out there and the ones I tried all seemed to have issues of one sort or another, mostly to do with dd complaining that it would not run on 64 bit Windows. My other issue is that they are command line based. Not that I mind using the command line but it does feel fiddly when all you want to do is get on with writing the image to the USB stick so you can install Debian.
    Next I came up with unetbootin. This looks promising and seems to work but it does some very strange rewriting of the boot menus you get on the resulting USB stick. I was confused by the menus when I first saw it and I’m sure novice users would have no idea what to do.
    Finally dvs on #debian suggested win32diskimager. This is exactly what I wanted. A point and click solution.

    screenshot of win32diskimager
    screenshot of win32diskimager

    Select the DVD image you want. If the file’s extension is .iso you’ll need to change the filter from *.img;*.IMG to *.* in order to see the file. Then select the Device you want to write to. Hit Write and go and have a cup of tea while it writes the ISO to the USB stick.

  • Project Euler No. 1 in Emacs elisp

    My first Project Euler solution, and my first emacs elisp program.
    Multiples of 3 and 5.
    If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
    Find the sum of all the multiples of 3 or 5 below 1000.
    My solution:

      (defun divisibleby (dividend divisor)
        "check if dividend is divisible by divisor"
        (if (not(integerp dividend))
            (error "dividend must be an integer"))
        (if (not(integerp divisor))
            (error "divisor must be an integer"))
        (zerop (mod dividend divisor))
        )
    (let  ((lower 1)
           (upper 1000)
           (sum 0))
      (loop for i from lower to (- upper 1) do (if (or (divisibleby i 3)
                                                  (divisibleby i 5))
                                             (setq sum (+ sum i)))
            )
      (message "sum is: %d" sum)
      )
    
  • Flipping the mouse wheel scroll direction in Windows 7

    I have been getting very confused between the mouse wheel scroll directions in Windows 7 and Mac OS X Lion. As I consider OS X to be the future, I decided to try and flip the mouse wheel scroll direction in Windows.
    Turns out there is a registry setting to do this: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\????\????\Device Parameters
    Set the value of FlipFlopWheel to 1
    You need to find the USB enumeration values (shown above as ????). You can get those by going to the Mouse Control Panel, click on the hardware tab and click Properties. then in the Details tab of the HID-compliant mouse Properties window, look at the Device Instance Path property. It will be something like: HID\VID_046D&PID_C049&MI_00\7&25DD4DC&0&0000

    This is quite well documented on superuser.com and there is even a link to a little .exe that automates the whole process for you. Although I have not tried it so I can’t vouch for it.

  • gnus, imap and gnutls in win32

    I’ve been trying to get gnus working in emacs in win32 for the past few days. There were a number of obstacles to overcome:

    1. Install gnutls
    2. The gnus README.w32 says gnutls should be installed and in the path. I found that it must be in the windows system path to make it work. Setting the path within emacs was not good enough. So add C:\Program Files (x86)\gnutls\bin;C:\Program Files (x86)\gnutls\lib to your system path by going to Start/Edit System Environment Variables then click Environment Variables and edit Path in System Variables
    3. you need to edit the emacs variable gnutls-trustfiles to point to windows paths to .crt files. by default it had paths to unix locations. The only way I could find to get these files was to install cygwin and then make gnutls-trustfiles equal to ("C:/cygwin/usr/ssl/certs/ca-bundle.trust.crt" "C:/cygwin/usr/ssl/certs/ca-bundle.crt")

    Unfortunately these last two steps were not obvious to me and it took me quite some time to work through them.
    Tip: if you need to debug gnutls, try setting (setq gnutls-log-level 50).
    Now all I need to do is learn gnus!