Getting OpenBSD 5.3


rsync -va --progress rsync://ftp.kddilabs.jp/openbsd/5.3/i386/install53.iso /cygdrive/e/T/complete/warez/
Posted in Unix One-Liners | Tagged , | Leave a comment

Jack Reacher (2012)

Being a Tom Cruise movie, it has him acting just as he always does — an ever smart, know-it-all guy who knows everything about the crime even before the movie reaches halfway. Plus, he knows martial arts too and apparently he’s quite good at it. Rosamund Pike is pretty acting as some lawyer. It’s nice seeing Robert Duvall though, but he’s not there for any acting, he’s just in there for the cameo of it — well for those who still recognizes him anyway.

IMDB gave it a 7.1. I give it a 4 for Mr. Know It All and for pretending that that Russian one-fingered guy is so menacing but in fact people are just scared of his blind eye that’s why they follow his orders. And that last fight scene where Cruise drops his rifle in exchange for a fist fight… sure. I skipped that even before they threw the first punch. That scene is so Steven Seagal.

Posted in Movies I watched | Leave a comment

Eastern Promises (2007)

I’ll drink vodka to this movie. Nice Cronenberg/Viggo combination.

Posted in Movies I watched | Tagged , | Leave a comment

Mr. Brooks (2007)

I like it.

Posted in Movies I watched | Tagged | Leave a comment

Filebot rename format expression

I use this:

{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/).replace(':',' -')} ({y} {certification} {imdb.rating} {genres})

It will replace all “:” with ” -”

It will move “The” or “A” to the end of the title.

It will add the year, certification, imdb rating and genre to the end.

So this will result in:

Before:

The Movie: A great movie (2009).avi

After:

Movie – A Great Movie, The (2009 PG-13 8.0 [Action, Adventure, Drama]).avi

 

Posted in HowTo | Tagged , | Leave a comment

Write your passwords on paper tip

http://left.subtree.org/2011/07/01/passtab-store-passwords-in-your-wallet

“Tabula recta”

Posted in General | Tagged , | Leave a comment

Temporary email address for sites that need registration

http://10minutemail.com

This is best for sites or forums where it requires you to create an account but you only need to view one post and you’ll never login again.

I also have a throwaway Gmail account for this single purpose.

Posted in HowTo | Tagged | Leave a comment

How to copy directory tree structure from one Sharepoint 2010 library to another

1. Map both source and destination links to drives and take note which is which.

2. robocopy x: y: /e /z /xf * /tee /log:robocopy.log

This will also show the status of the copy and save a log file.

Posted in HowTo | Tagged , | Leave a comment

How to fight social networking addiction and permanently delete accounts online

I’ve written a couple of posts about deleting facebook and yahoo accounts before. So we are good there.

The problem with these online accounts is that they still give you a  chance to come back (usually 14 days). So if you are itching to check on your facebook account after you have decided to delete it within 14 days then you will activate it again.

To make sure you can’t login back to your account and revive it again, before deleting it, create a strong random password that you can’t memorize.

Google for “generate random password online” and it will give you sites that you can use (or just open notepad and type randomly on the keyboard and number keypad). DO NOT SAVE THE NOTEPAD FILE. Just leave it there open so you can copy paste your new password when you’re confirming the change.

After that go ahead and delete your account.

Delete Facebook account.

Delete Yahoo account.

Close the notepad file WITHOUT saving it.

Congratulations. You’re now free.

 

 

 

 

Posted in HowTo | Tagged , , | 1 Comment

[Sharepoint 2010] Cascading drop-down menus via SPServices/jQuery

I’ve been using InfoPath to achieve this effect in Sharepoint lists but somehow I can’t wrap my head around the data connections and filters and all that. I always need to consult this Youtube video  (which is great btw).

jQuery is nice because you can just paste the code within your NewForm.aspx inside the PlaceHolderMain tags and it will work. No mucking around with filters in InfoPath.

So let’s start.

You need to download jQuery and SPServices.

The latest jQuery (production code) right now is this:

http://code.jquery.com/jquery-1.8.2.min.js

* Update Feb. 5, 2013: Do not use the latest jquery minified version (as of now, 1.9.1) as it breaks SPServices. Use jquery-1.8.2.

Download the latest SPServices at codeplex:

http://spservices.codeplex.com/

Save the *.js files in a Library in the same site you are trying to get the cascading lists to run.

Now here’s the fun part.

Part I. Create the Parent and the Child Lists

Parent List

Let’s use the name ‘MainCategory‘ as the name of the parent list.

It will only have 1 column: Title. Create 2 items: Hardware and Software.

Child List (or the relational list)

This is also called the relational list because in here you will come to specify the relationship between the parent and child dropdowns.

Let’s name the child list as ‘SubCategory‘.

This list will have 2 columns: Title and Hardware.

Populate Title with computer related items, both hardware and software names.

The ‘Hardware‘ column is a lookup column for the ‘MainCategory‘ list (parent list).

Fix the list so the items are all matched with their category like so:

Part II. Create the Form

The Form is the list where the cascading effect will happen.

It will have 2 columns: Hardware and Software.

Both are lookup columns:

Hardware is a lookup column to the MainCategory list.

Software is a lookup column to the SubCategory list.

I left the Title column in there but it’s not important for this experiment.

Let’s name this third list as ‘RequestForm‘.

Part III. Upload jQuery and SPServices and check if they are working

Before trying to do the cascade effect, let’s make sure that the javascript files are being called properly without any problems.

Open RequestForm list’s NewForm.aspx file in Sharepoint Designer in Advanced Mode.

Go into the Code View and search for the tag ‘PlaceHolderMain‘. You will come to this tag:

 

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

 

Here’s how it will look like in Sharepoint Designer:

Immediately after that ‘PlaceHolderMain‘ tag, paste the code below:

Credits to Marc D Anderson for this nice tip! I just changed the path to the JS files. I uploaded it to the Shared Documents library on the same site.

<script type="text/javascript" language="javascript" src="../../Shared%20Documents/jquery-1.8.2.min.js"></script>
<script type="text/javascript" language="javascript" src="../../Shared%20Documents/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript" language="javascript">
  $(document).ready(function() {
    alert("jQuery");
   alert($().SPServices.SPGetCurrentSite());
  });
</script>

Save the NewForm.aspx file and load it in the browser (or just add an item to the RequestForm list). You should be getting pop-up notifications after the page is loaded.

This just means your jQuery files are working. Nothing to be overly excited about. But this check right here will save you the headaches of debugging your cascade code when all this time what is wrong with it is just the path.

Part IV. The Cascade Code

Remove the Check Code above if it’s working (and fix it if it’s not).

Replace it with this code (still right after ‘PlaceHolderMain’ tag):

<script language="javascript" type="text/javascript" src=".../../Shared%20Documents/jquery-1.8.2.min.js"></script>
<script language="javascript" type="text/javascript" src="./../Shared%20Documents/jquery.SPServices-0.7.2.min.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
		$().SPServices.SPCascadeDropdowns({
			relationshipList: "SubCategory",
			relationshipListParentColumn: "MainCategory",
			relationshipListChildColumn: "Title",
			parentColumn: "Hardware",
			childColumn: "Software",
			debug: true
		});
	});
</script>

Let’s go through that one line at a time.

Lines 1 and 2 loads jquery and SPServices:

<script language="javascript" type="text/javascript" src="../../Shared%20Documents/jquery-1.8.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../../Shared%20Documents/jquery.SPServices-0.7.2.min.js"></script>

Lines 3 to 13 is the actual call to do the cascade function ‘SPCascadeDropdowns‘.

relationshipList is our child list called ‘SubCategory’.

relationshipListParentColumn is the name of the lookup column for the parent items ‘MainCategory‘ which is NOT the name of the parent list. Please don’t be confused by this. So let me repeat it, it is the name of the column that looks up to the parent list. It’s the column pointed to by the red arrow, boxed in red:

parentColumn is the name of the lookup column in the RequestForm list for the parent items.

childColumn is the name of the lookup column in the RequestForm list for the child items.

Save the NewForm.aspx and try adding an item to the RequestForm list.

Posted in Computer/IT, HowTo | Tagged , , , | 8 Comments