blog.world3.net

Deleting files with very long names

09/01/2011 – 10:33

In Windows there is a maximum 255 character path name. You can create files and folders with longer paths but they will become inaccessible and undeletable. Sometimes this happens if you extract an archive containing long file/directory names. Actually it is a pretty good way to frame someone; just make them extract an archive with a directory called “bomb making plans” and a file with a really long name inside it and they will be unable to remove it from their PC.

Fortunately there is a way to remove such files and directories, as long as you have 8.3 name creation enabled (it is by default). Use “dir /X” to find the short name of each item you can’t access and use “rename <short name> a” to change its name to “a”. If it is a directory you may have to enter it and do the same for any paths below it. Windows can’t even open a directory that contains other files or directories with long names so often the problem is two or three levels deep.

By mojo | Posted in windows | Comments (0)

Accuracy of clocks for timekeeping

31/12/2010 – 19:09

The MSF set clock I built earlier this year was using the AVR’s 16MHz crystal for timekeeping. It was fine during the warmer months but recently as temperatures fell it started to loose accuracy. By the late evening it could be as much as 30 seconds out, so I decided to add a new reference clock with greater accuracy.

After evaluating a few different options I decided to use a CMOS 4060 14 stage ripple counter with a 32768Hz watch crystal. My experiments showed a very high degree of accuracy (better than 0.005%) at very low cost. The exact component values used for the resistors and capacitors did not seem to make much difference (±0.002%) either. Once installed in the clock case the environment was a bit harsher than my test bench due to EM and supply ripple, much of which is generated by the multiplexed display. Long time readers (ha) may recall that the display has to be turned off during MSF reception because of the noise it creates. Despite that the clock is now accurate to within 2 seconds per day, and since it is synchronised every night that is more than adequate.

For non-synchronised clocks a more accurate time source would be required for long term stability. Using the mains 50Hz frequency is a popular option. Realistically getting much better than 2 seconds/day is going to require some shielding and a well filtered power supply. Temperature does not seem to be as critical for watch crystals but even over room temperature ranges it will be an issue.

By mojo | Posted in electronics | Comments (0)

Transfer Read It Later to Instapaper

28/12/2010 – 19:06

I decided to switch from ReadItLater.com to Instapaper and needed to move all my links over. There does not seem to be any way to do it so I made one. Simply run the following script, entering your personal data in the relevant places:

curl -k "https://readitlaterlist.com/v2/get?username=[user]&password=[pass]&apikey=[key]&since=1245638446" >ril.txt
tr "{}" "\n " <ril.txt >ril2.txt
tr -d '\\' <ril2.txt >ril.txt
sed "s/\"\:\"/\,/g" ril.txt >ril2.txt
sed "s/\x22//g" ril2.txt >ril.txt
awk -F "," "{print $7}" <ril.txt >ril2.txt
awk -F "," "{print $6}" <ril.txt >>ril2.txt
grep "http" ril2.txt >dump.txt
awk "{print \"curl -k -d username=\x22[user]\x22 -d password=[pass] -d url=\x22\"$0 \"\x22 https://www.instapaper.com/api/add\" }" <dump.txt >upload.cmd
del ril.txt
del ril2.txt

You can then run upload.cmd to add your URLs to InstaPaper. You need curl, tr, sed, awk and grep. It could be done from Perl too but I don’t have time to figure it out.

By mojo | Posted in Internet, software | Comments (0)

Google does not check Street View removal requests

11/11/2010 – 17:06

All you need to submit a content removal request for images on Google Street View is an email address. The is no other validation, meaning you can remove anything you want to.

Well, perhaps not anything… The Albert Hall might be going too far (unless you claim to be a person in the image) but basically if you claim the images shows your house/car/person it will be removed. Even claiming on the flat above shops works.

I suppose this is due to all the controversy over privacy and Google’s desire to make removal as easy as possible. It’s certainly a good way to sabotage rival businesses by making them harder to find.

By mojo | Posted in Internet, privacy, security | Comments (0)

Miranda IM automatic update script

28/08/2010 – 18:45

Found a useful script to auto-update Miranda IM. They really should create an update system for it. I modified the script to work on my system and with newer releases in 7zip format.

chdir /D update
c:\portable\gnu\wget.exe http://code.google.com/p/miranda/downloads/list -O data.txt
type data.txt|findstr /i unicode.7z 1> data1.txt
del data.txt
ren data1.txt data.txt
c:\portable\gnu\wget.exe --force-html -c -i data.txt
for /f "tokens=1-3 delims=." %%a in ('dir *unicode.7z /b') do set ver=%%a_%%b_%%c
echo S|"C:\Program Files\7-Zip\7z.exe" x *unicode.7z -o%TEMP%\%ver%
del *unicode.7z
del data.txt
cd ..
%windir%\system32\taskkill.exe /IM miranda32.exe
ping localhost -n 5 > nul
%windir%\system32\taskkill.exe /F /IM miranda32.exe
for /f %%f in ('dir *.* /b/a:-d') do copy %TEMP%\%ver%\%%f %%f
cd Plugins
for /f %%f in ('dir *.* /b/a:-d') do copy %TEMP%\%ver%\Plugins\%%f %%f
cd ..
start miranda32.exe

By mojo | Posted in Internet, software, windows | Comments (0)

Interesting article and debate on DNA identification probabilities

20/08/2010 – 16:19

Article and Slashdot discussion. Hopefully more people are now starting to wake up to the fallibility of DNA.

Real life isn’t like CSI where they get a perfect sample and the computer flashes up a perfect match. In fact, CSI does that for fingerprints too… Shocking for a show supposedly based on science.

By mojo | Posted in law | Comments (0)

George Osborne on social mobility

17/08/2010 – 19:46

I was surprised to hear Mr. Osborne talking about social mobility today, but then I realised what he meant. He doesn’t mean making things fairer for everyone and allowing us all to improve our lot, he means he wants to support entrepreneurs and the Thatcher dream.

It’s our version of the American Dream™ – the idea that anyone can make it if they work hard. It is of course bollocks. The reality is that most people spend their lives working for others, and not because of a lack of drive or ambition but simply because that is the most reasonable thing for them to do. Not everyone is suited to going it alone or running a business. Even if you are about 60% of businesses fail within four years, and of course even if yours does not that is no guarantee that you will improve your social standing because of it. How many corner shop owners or painters struggle to reach the middle class, let alone actually becoming quite well off?

Of course there is nothing wrong with working for a salary. Lots of highly educated, hard working people do. But Osborne, like Thatcher before him, isn’t interested in them. Well, not beyond the point that they consume and thus create opportunities for businessmen and bankers. Thatcher wanted everyone to own a car, own their own home, own shares in former public utilities… Those are the least terrible aspects of it. Thatcherism considers any service that the government provides to be a lost business opportunity.

Need gas, water and electricity? Need to travel by train or by bus? Feeling ill? Fantastic, get out your credit card and I’ll introduce you to some friends of mine.

By mojo | Posted in politics | Comments (0)

Windows 7 Tweaks

16/08/2010 – 20:34

Finally got around to installing Windows 7 on my main machine. As usual there are a lot of tweaks that need to be made.

The Start Menu has some nice features but I really don’t like the way the All Programs section works now. Fortunately you can bring back the old cascaded menu and keep all the good new stuff with Classic Shell.

The Game Controllers applet in the Control Panel has gone, and I had a shortcut to it on my Start Menu anyway because I use it for development. It is possible to do in 7: http://www.sevenforums.com/tutorials/57153-game-controllers-shortcut-create.html

I use MaxTo for window positioning so I turned off Aero Snap: http://www.howtogeek.com/howto/windows-7/disable-the-mouse-drag-window-arranging-feature-in-windows-7/

To replace notepad.exe with notepad++ copy NppLauncher over notepad.exe after taking ownership/permissions in these locations:

  • c:\Windows\notepad.exe
  • c:\Windows\System32\notepad.exe
  • c:\Windows\SysWOW64\notepad.exe

Disable driver signing: Use DSEO to enable test mode and then sign the offending driver files. Unfortunately a security update makes it impossible to disable driver signing completely. Remove the test mode watermark with (surprise surprise) Remove Watermark.

Outstanding irritations:

  • Can’t put the Recycle Bin or My Computer on the new start, but you can make shortcuts in “All Programs.”
  • Clock on compact Task Bar takes up enough room for the date, even though it only shows the time. Can be “fixed” by changing the date format but the setting is system-wide.
By mojo | Posted in software, windows | Comments (0)

Animal cruelty

10/08/2010 – 18:36

Someone attacked my cat. The put some black stuff around his ear and cut the whiskers on one side of his face down to about 1cm. I reported it to the RSPCA.

I just hope it was some kids who will get bored soon. The thought that an adult would intentionally do something like that is too disturbing to contemplate for long.

By mojo | Posted in idiots, law | Comments (0)

Playstation Beatmania controller tested

01/08/2010 – 20:02

I got a Beatmania DJ turntable controller for the Playstation and it works perfectly with the Retro Adapter. It’s actually pretty simple; it emulates a digital pad. When the wheel is turned it just presses the up or down buttons on the d-pad. It doesn’t even use analogue for speed sensing etc.

By mojo | Posted in electronics, microcontrollers, Retro Adapter | Comments (0)
Page 3 of 1912345...10...»Last »
たとえ溺れても梦はゆめでしかない
  •  

    February 2012
    M T W T F S S
    « Jan    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Categories

    • audio (1)
    • avr (20)
    • BBC (1)
    • electronics (29)
    • genius (4)
    • hardware (22)
    • idiots (39)
    • Internet (21)
    • law (20)
    • microcontrollers (12)
    • networking (17)
    • politics (29)
    • privacy (19)
    • Retro Adapter (5)
    • security (17)
    • software (32)
    • Uncategorized (18)
    • windows (25)
  • Archives

    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • March 2011
    • January 2011
    • December 2010
    • November 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • November 2005
  • Links:

    Main site: world3.net

    Electronics: denki.world3.net

WordPress | Sandbox