Cybersweden

Archive for January, 2012

How to: Adjust the password session time for a protected page in WordPress

by on Jan.22, 2012, under How to

In the wp-pass.php file we look for the following line of code:

setcookie(‘wp-postpass_’ . COOKIEHASH, stripslashes( $_POST[‘post_password’] ), time() + 864000, COOKIEPATH);

The 86400 is the number of seconds that the password session will be alive.

If you only want the cookie to be active for let’s say 30 minutes, just simply change 864000 to 1800.

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
3 Comments more...

How to: Create a YouTube playlist with iMacro and Firefox

by on Jan.22, 2012, under How to

Assume that we use:

  • Win OS
  • Firefox 9.0.1
  • iMacros for Firefox 7.4.0.8

and we want to batch-fill a playlist in YouTube with links to various videos.

1. We must first create a variables.txt file where we enter a single column of variables. Make sure that the file has Unicode coding. Lets say that this file now contains 11 links that should be added to a playlist on YouTube. Each link should have its own individual line in the variables.txt file.

http://www.youtube.com/watch?v=BcMvw
http://www.youtube.com/watch?v=wegdE
http://www.youtube.com/watch?v=ggirRq
http://www.youtube.com/watch?v=Nuiegs

2. Change the .txt extension to .csv (afterwards though, continue to edit the file in Notepad)
3. Put the file in C:\Documents and Settings\USERNAME\My Documents\iMacros\Datasources\
4. Log into YouTube and place the marker at the “Add Video by URL”
5. Compile and execute in iMacro through the Play (Loop) button.

SET !DATASOURCE variables.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=2 TYPE=INPUT:TEXT FORM=ACTION:/playlist_edit ATTR=* CONTENT={{!COL1}}
TAG POS=1 TYPE=BUTTON ATTR=ROLE:button&&ONCLICK:;returnfalse;&&CLASS:playlist-add-video-url-button-addyt-uix-button&&TYPE:button&&TXT:Add
WAIT SECONDS=1

6. It does not hurt to loop the same amount of time as the number of rows in your .csv file. Toggle this by opening the variables.csv in excel to count rows, but edit in Notepad.

VN:F [1.9.22_1171]
Rating: 4.9/5 (7 votes cast)
VN:F [1.9.22_1171]
Rating: +6 (from 6 votes)
Leave a Comment more...

How to: Clear Spotify cache under Mac OS from Terminal

by on Jan.20, 2012, under How to

This is a non-reversible command so plz use it at your own risk!
Open Terminal and execute:

sudo rm -fr /Users/USERNAME/Library/Caches/com.spotify.client/Storage/*

VN:F [1.9.22_1171]
Rating: 4.2/5 (5 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 5 votes)
Leave a Comment more...

How to: Link to a YouTube clip with the highest resolution

by on Jan.18, 2012, under How to

Just add

&hd=1

to the end of the link.

For instance, if you desire to share:
http://www.youtube.com/watch?v=7XZGJiY2a3o

but want to enforce highest possible resolution in the link – just adjust the link so it looks like:
http://www.youtube.com/watch?v=7XZGJiY2a3o&hd=1

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
Leave a Comment more...

How to: Kill/close a program/application via telnet

by on Jan.17, 2012, under How to

taskkill /f /im vlc.exe

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!