måndag, september 30, 2013

After lots re-installations of Windows perhaps you have some difficulties with the file permissions on some old files.

To fix that all you have to do is to open a command promt as administrator and type the following:
icacls * /T /Q /C /RESET

That will reset the permissions and give all Users read/execute permissions to it.

Then you probably want your account to have full access:
icacls * /T /Q /C /INHERITANCE:e /GRANT YouUserNameHere:(OI)(CI)F

That will edit or remove (:e or :r) all the inheritance options - grant new ones  (IO and CI) - and give you Full (F) permissions. OI = object inherit, CI = container inherit.

The switches /T /Q /C are just some generic you always should use.

måndag, september 10, 2012

Folder action script

I'm following a bunch of tv series which I download. The problem I was facing was to remember which episode I last viewed. I could always keep the last episode on my computer of course. But that soon took up to my disk space. Specially when the season had ended and it took another half year until next episode.

So I started to investigate what Mac OS X's Folder Actions was. 
It's action based on happenings in a specified folder. You apply a script to it and it does the rest. 

I'm having this script attached to a folder i call SEEN which I put all the watched episodes in when I'm done.

The script:


on adding folder items to this_folder after receiving these_items
 
 set dialogResult to display dialog "Empty content of file(s)? No way to undo!"
 
 if button returned of dialogResult is "OK" then
  
  repeat with i from 1 to number of items in these_items
   set this_item to item i of these_items
   
   do shell script ("cat /dev/null > " & quoted form of POSIX path of this_item)
   
  end repeat
  
  display dialog "Done."
 end if
 
end adding folder items to




So when I'm done watching an episode, I put it in my SEEN folder and a questions popups asking me if I want to empty the file. I click OK and voila, the file is 0 bytes.

lördag, december 04, 2010

Automator - run app with command line paramters

Every day I'm finding new tools in Mac OS X that are really helpfull. No need for all those mini powertools in Windows that you have to have hundreds off to accomplish your goals, everything is built into the OS.

Here I'm using Automator to run an other application, but with command line parameters.

You do like this:
  • Search for "shell" in the search field in Automator
  • Then use Run Shell Script (no need to change the default values)
  • Then enter: open /Applications/Google\\ Chrome.app --args -enable-default-apps (notice the double backslashes!)
Looks like there is tons of other useful featurs in Automator that I need to check out in the feature. They look really promising!

tisdag, juni 22, 2010

Windows 7 - move profile folder to non-system partition

As you know, Windows 7/Vista put all system data and user data on the same partition, normally it’s drive C.

Under this condition we must backup our user data every time we re-install our Windows 7/Vista. From Windows Vista, Microsoft supply us a tool mklink which can create a symbolic link under Windows 7 or Vista just as the command ln under unix/linux. Below is an example about how to put user data on non-system using mklink in Windows 7.

  1. Enable administrator account and set a password for it. 
  2. Logoff and login with administrator account. Relocate your user data to other non-system partion, for example from C:\users\J to D:\users\J
  3. Use mklink to create a symbolic link from C:\users\J to D:\users\J: mklink /D C:\Users\J D:\users\J
  4. Re-login use your own account,you will find nothing changed, but in fact your physical user data is on drive D.

Done. The next time you re-install your OS, just use the same user name, remove C:\users\J then run the command of step 3 again then your user data is back.

Source: http://www.windows7home.net/how-to-move-user-data-folder-to-non-system-partition-in-windows-7vista/

torsdag, januari 14, 2010

Tunatic for Windows 7 and Vista

Tunatic is acoustic fingerprint software that allows you to listen to songs through a microphone and identify the song, and it works even for Windows 7 and Vista!

If you want to identify the current song you are playing on your computer instead of using a mic, you can do the following:

  1. Go to Control Panel => Sound => then to the 'Recording' tab
  2. Right-click in the list and Show Disabled Devices

Then, hopefully, if your sound card supports it, something named 'Stereo Mix' (could have other names!) will appear in the list. It has a icon that looks like a pci card. -Right-click and enable it!

Then start playing the song you want and make Tunatic identify it!

You will see a moving oscilloscope in the background of Tunatic when it hear sound. If it doesn't you can try to right-click in Tunatic and choose Settings and maybe choose the correct input device.

You can download Tunatic here: http://www.wildbits.com/tunatic/

Other similar softwares: Shazam, Midomi

måndag, oktober 19, 2009

Opera - Custom Search Engine

PTS har lanserat en tjänst där du kan kontrollera vilken operatör ett visst nummer tillhör.

För att kolla nummret direkt från webläsaren Opera, gör följande:

  1. Gå till valfri sida, t.ex: www.google.se
  2. Högerklicka i ett tomt fält där du normalt kan skriva
  3. Välj 'Skapa Sökning' (längst ner)
  4. Välj ett nyckelord som du vill använda när du ska söka, t.ex: pts
  5. Tryck på knappen [Detaljer]
  6. Kryssa bort "Använd POST"
  7. i Adressfältet, fyll i följande:

var s='%s'; if (s.match(/^\+46/)) s=s.substring(3); else s=s.substring(1); var p = s.split(/^(10|100|11|120|121|122|123|125|13|140|141|142|143|144|150|151|152|155|156|157|158|159|16|171|173|174|175|176|18|19|20|21|220|221|222|223|224|225|226|227|23|240|241|243|246|247|248|250|251|252|253|258|26|270|271|278|280|281|290|291|292|293|294|295|297|300|301|302|303|304|31|320|321|322|325|33|340|345|346|35|36|370|371|372|376|378|379|380|381|382|383|390|392|393|394|40|400|410|411|413|414|415|416|417|418|42|430|431|433|435|44|451|454|455|456|457|459|46|470|471|472|474|476|477|478|479|480|481|485|486|490|491|492|493|494|495|496|498|499|500|501|502|503|504|505|506|510|511|512|513|514|515|518|519|520|521|522|523|524|525|526|528|530|531|532|533|534|54|550|551|552|553|554|555|560|563|564|565|570|571|573|580|581|582|583|584|585|586|587|589|590|591|60|600|611|612|613|620|621|622|623|624|63|640|642|643|644|645|647|649|650|651|652|653|655|656|657|660|661|662|663|670|671|672|673|674|675|676|680|682|684|687|690|691|692|693|695|696|70|71|72|73|74|75|76|77|78|8|800|90|900|910|911|912|913|914|915|916|918|920|921|922|923|924|925|926|927|928|929|930|932|933|934|935|939|940|941|942|943|944|950|951|952|953|954|958|960|961|967|969|970|971|973|975|976|977|978|980|981|99)/); window.location.href='https://pts.siriusit.net/net/PTS/etjansterStart/svenska/Om_Webbplatsen/Nummerkapacitet_r/Enskilt+nummer?&__rp_/pts.SearchNumber_ndc='+p[1]+'&__rp_/pts.SearchNumber_operator=xxno_operatorxx&__rp_/pts.SearchNumber_telnumber='+p[2];

Nu kan du kolla upp nummer direkt från adressfältet i Opera!

PTS 0701234567 eller PTS +46701234567

lördag, september 19, 2009

Your hard disk drive crashes?

Happens to everyone sooner or later. 

If you've got some important stuff on your HDD that crashed and you want to try ANYTHING to get it back, this is for you!

I found a PDF document a while back that has plenty of tricks you could try out, but not only that... it contains feedback from users that tried out the different methods!

(Maybe it sounds pretty wired that it's in a pdf and not on a web page,  but that's the way it is.)

It's called "200 ways to revive a hard drive" - google it here if you want.

Or get my copy: http://dl.getdropbox.com/u/286265/computers/200ways.pdf