How to: Force a reboot on a Mac Server – remotely via ssh
by RafMan on Jun.26, 2012, under How to
Leave a Comment more...How to: Adjust the password session time for a protected page in WordPress
by RafMan 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.
How to: Create a YouTube playlist with iMacro and Firefox
by RafMan 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.
How to: Clear Spotify cache under Mac OS from Terminal
by RafMan 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/*
How to: Link to a YouTube clip with the highest resolution
by RafMan 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
How to: Kill/close a program/application via telnet
by RafMan on Jan.17, 2012, under How to
Leave a Comment more...EU net balance 2007 – 2013
by RafMan on Nov.22, 2011, under Misc
During 2011 many Europeans started to wonder if their taxes are patching up deficits in other EU countries. I often found myself in dispute with friends, colleagues and even family members arguing about whether a particular EU member state is a net recipient or contributor of EU funds. This document came frequently to our aid.
Source: Open Europe briefing note: European Communities (Finance) Bill
Different Jobs
by RafMan on Nov.13, 2011, under Sociopol, Thought
The following summarization of the year 2011 has gained huge popularity on the Internet. Two very important historical events followed by the outmost disregard and contempt towards a well-known Italian politician. The term “jobs” links all three of them.
Success
by RafMan on Nov.13, 2011, under Misc, Sociopol, Thought
Some might disagree with this statement and I won’t quarrel neither on the definition on success nor on how it really looks like getting there. I will summarize my own personal view with the words of Moliere: “The greater the obstacle, the more glory in overcoming it.”
How to: Batch create multiple folders on Mac OS X 10.7 Lion
by RafMan on Nov.04, 2011, under How to
Use applescript, compile and run:
set theDestinationFolder to choose folder
set theListOfValues to {“Nome of folder 1”, “Name of folder 2”, “Name of folder 3”}
tell application “Finder”
repeat with theCurrentValue in theListOfValues
make new folder at theDestinationFolder with properties {name:theCurrentValue}
end repeat
end tell
You can also use a .csv file:
set mgCSVfile to choose file
open for access mgCSVfile
set mgList to (read mgCSVfile)
close access mgCSVfiletell application “Finder”
repeat with x from 1 to count paragraphs of mgList
set mgFolder to container of mgCSVfile as text
set text item delimiters of AppleScript to “,”
set mgThisList to text items of paragraph x of mgList as list
set text item delimiters of AppleScript to “”repeat with i from 1 to count mgThisList
if item i of mgThisList is not “” then
set mgSubFolder to item i of mgThisList
if (exists folder mgSubFolder of folder mgFolder) is false then
make new folder at mgFolder with properties {name:mgSubFolder}
end if
set mgFolder to (folder mgSubFolder of folder mgFolder) as alias
end if
end repeatend repeat
end tell